ros-controls / realtime_tools

Contains a set of tools that can be used from a hard realtime thread, without breaking the realtime behavior.
https://control.ros.org
BSD 3-Clause "New" or "Revised" License
140 stars 76 forks source link

[AsyncFunctionHandler] return execution time in nanoseconds #181

Closed saikishor closed 1 month ago

saikishor commented 1 month ago

I think this is useful to have more statistical data when we add to the CM

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.51%. Comparing base (926f097) to head (5fe33ee).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #181 +/- ## ========================================== + Coverage 75.36% 75.51% +0.14% ========================================== Files 8 8 Lines 341 343 +2 Branches 54 54 ========================================== + Hits 257 259 +2 Misses 50 50 Partials 34 34 ``` | [Flag](https://app.codecov.io/gh/ros-controls/realtime_tools/pull/181/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ros-controls/realtime_tools/pull/181/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | `75.51% <100.00%> (+0.14%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/ros-controls/realtime_tools/pull/181?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | Coverage Δ | | |---|---|---| | [include/realtime\_tools/async\_function\_handler.hpp](https://app.codecov.io/gh/ros-controls/realtime_tools/pull/181?src=pr&el=tree&filepath=include%2Frealtime_tools%2Fasync_function_handler.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls#diff-aW5jbHVkZS9yZWFsdGltZV90b29scy9hc3luY19mdW5jdGlvbl9oYW5kbGVyLmhwcA==) | `91.25% <100.00%> (+0.22%)` | :arrow_up: |
saikishor commented 1 month ago

Shouldn't a nanosecond be represented in a double value of seconds? The time delta will be <1.0 -> we have ~15 digits after the comma?

@christophfroehlich Yes, but if you want to see the spikes in that 15 digits, it is not very easy. Instead, having it as nanoseconds can let you easy. This is the most granularity you can get