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

fix(cmd_duration): Make render_time format more consistent #5825

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

LionC
Copy link

@LionC LionC commented Mar 6, 2024

Description

  • Make timing format always show enabled components after te\he first nonzero component (see Make render_time format more consistent #5822 )
  • Reduce the dynamic string allocation part of the render_time function to a single string allocation by pre-allocating the (pretty much fixed size for a given input) string
  • Make render_time return 0s instead of 0ms when show_millis is false (that result is not rendered anyways though)
  • Prefix the tests for the render_time function with render_time_ to make them runnable via cargo test render_time

Motivation and Context

Closes #5822

How Has This Been Tested?

  • Passed the old tests except the ones it shouldn't
  • Added new tests

Checklist:

  • I have updated the documentation accordingly. (n/a)
  • I have updated the tests accordingly.

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

Successfully merging this pull request may close these issues.

Make render_time format more consistent
2 participants