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

Increase log timing precision (ms -> us or ms) #164

Open
1 of 3 tasks
Quincunx271 opened this issue Jun 25, 2021 · 1 comment
Open
1 of 3 tasks

Increase log timing precision (ms -> us or ms) #164

Quincunx271 opened this issue Jun 25, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@Quincunx271
Copy link
Member

Quincunx271 commented Jun 25, 2021

Our logs have a time field that reports the number of milliseconds since we started scheduling the block. This is good, but most blocks take 0ms or 1ms, which means that sums based on these 0ms blocks are problematic (e.g. it could be that it just always take 0.9ms, so with 100,000 such blocks, that would actually be 90 seconds, which is significant). We should increase the precision of this time field either to microseconds or nanoseconds.

The approach of doing this by modifying Utilities::GetProcessorTime() to return nanoseconds is problematic, because that messes with our time limits. Instead, I think this would be most easily implemented by modifying the logging code to compute its own more precise elapsed time instead of using Utilities::GetProcessorTime().

Summary:

  • Decide ns or us.
  • Update the event logger in logger.cpp to print the time with the higher precision.
  • Update scripts to account for this timing being in a higher precision. They would work, but they would think everything took 10^6 or 10^3 times longer than it did.
@Quincunx271 Quincunx271 added the enhancement New feature or request label Oct 30, 2021
@Quincunx271
Copy link
Member Author

I recommend microseconds. We are not down to nanosecond precision in our performance. However, it might be prudent to make the time field something like time_us instead; this might make it easier to migrate to nanoseconds in the future if necessary, as it will shine a bright light on scripts which still need to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant