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

perf: latency add more buckets, print percentage, and average #14047

Closed
wants to merge 1 commit into from

Conversation

dagar
Copy link
Member

@dagar dagar commented Jan 28, 2020

Add a bit more granularity to perf latency and slightly better output (percentages and average).

nsh> perf latency
bucket [us] : events
          1 : 19437 (93.70 %)
          2 : 303 (1.46 %)
          3 : 208 (1.00 %)
          4 : 82 (0.39 %)
          5 : 70 (0.33 %)
         10 : 486 (2.34 %)
         20 : 158 (0.76 %)
         30 : 1 (0.00 %)
         40 : 0 (0.00 %)
         50 : 0 (0.00 %)
        100 : 0 (0.00 %)
        200 : 0 (0.00 %)
        500 : 0 (0.00 %)
       1000 : 0 (0.00 %)
 >1000 : 0
Average : 1.420 us

@dagar dagar force-pushed the pr-perf_latency_buckets branch from d0c5952 to 3c30b55 Compare January 28, 2020 18:21
@dagar dagar requested a review from julianoes January 28, 2020 18:31
@dagar
Copy link
Member Author

dagar commented Jan 28, 2020

From the hardware test rack.

fmu-v3

Screenshot from 2020-01-28 13-55-02

fmu-v4

Screenshot from 2020-01-28 13-55-32

fmu-v5

Screenshot from 2020-01-28 13-54-07

holybro_durandal-v1

Screenshot from 2020-01-28 13-56-05

nxp_fmuk66-v3_default

Screenshot from 2020-01-28 13-56-43

@PX4 PX4 deleted a comment from codecov bot Jan 28, 2020
@mhkabir
Copy link
Member

mhkabir commented Jan 30, 2020

What's up with Durandal?

@@ -50,7 +50,7 @@

/* latency histogram */
const uint16_t latency_bucket_count = LATENCY_BUCKET_COUNT;
const uint16_t latency_buckets[LATENCY_BUCKET_COUNT] = { 1, 2, 5, 10, 20, 50, 100, 1000 };
const uint16_t latency_buckets[LATENCY_BUCKET_COUNT] = { 1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 100, 200, 500, 1000 };
__EXPORT uint32_t latency_counters[LATENCY_BUCKET_COUNT + 1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why +1 ?

@dagar dagar closed this Mar 12, 2020
@dagar dagar deleted the pr-perf_latency_buckets branch March 12, 2020 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants