Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement spans for metrics + profiling #1265

Closed
Tracked by #620
roby2014 opened this issue Jun 18, 2024 · 0 comments · Fixed by #1268
Closed
Tracked by #620

Implement spans for metrics + profiling #1265

roby2014 opened this issue Jun 18, 2024 · 0 comments · Fixed by #1268
Assignees
Milestone

Comments

@roby2014
Copy link
Member

roby2014 commented Jun 18, 2024

Problem

Current metric implementation does not support span blocks, which means, we can not have block + scope information of things. This is a problem because we can not, for example, create a flamegraph of our systems / functions / whatever profiling we want to do (as in the image) and see hierarchy, filter levels, etc..

image

Proposed Solution

  • Remove CUBOS_PROFILE. A span will always be profiled.
  • CUBOS_[LEVEL]_SPAN where LEVEL is TRACE DEBUG INFO
  • Metrics will be part of a span
  • Logs should also be part of a span

Example:

static void simulateFrame(int ms)
{
    CUBOS_INFO_SPAN(); // no name provided, will use __FUNCTION__ 

    // ...

    {
        CUBOS_TRACE_SPAN("block");
        CUBOS_METRIC("something", 2.0);
    }

    // ...

    {
        CUBOS_INFO_SPAN("lowlevel");
    }
    
    CUBOS_DEBUG_SPAN("anotherSpan");
}

provides a structure like

simulateFrame (span)
simulateFrame:block (span)
simulateFrame:block:something (metric)
simulateFrame:lowlevel
simulateframe:anotherSpan
@roby2014 roby2014 added A-Core S-Triage Issues whose priority still has to be figured out B-Telemetry labels Jun 18, 2024
@roby2014 roby2014 self-assigned this Jun 18, 2024
@roby2014 roby2014 mentioned this issue Jun 18, 2024
4 tasks
@roby2014 roby2014 added this to the 0.3 Standalone Editor milestone Jun 18, 2024
@roby2014 roby2014 linked a pull request Jun 20, 2024 that will close this issue
5 tasks
@RiscadoA RiscadoA modified the milestones: 0.3, 0.4 - ??? Aug 2, 2024
@RiscadoA RiscadoA removed the S-Triage Issues whose priority still has to be figured out label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants