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

Make render_time format more consistent #5822

Open
LionC opened this issue Mar 6, 2024 · 0 comments · May be fixed by #5825
Open

Make render_time format more consistent #5822

LionC opened this issue Mar 6, 2024 · 0 comments · May be fixed by #5825
Labels
✨ enhancement A new feature implementation.

Comments

@LionC
Copy link

LionC commented Mar 6, 2024

Feature Request

Not a feature not a bug, just an enhancement:

Is your feature request related to a problem? Please describe.

Currently, the cmd_duration module does not render time components which equal 0, meaning that the format is inconsistent in its length when multiple components are involved, making it hard to know what I am looking at at a glance:

  • 7260 seconds will render as 2h1m
  • 7201 seconds will render as 2h1s
  • 7261 seconds will render as 2h1m1s

Describe the solution you'd like

  • Render all components after the first non-zero component even if they are zero, so the examples above would become to make them scannable at a glance:
    • 7260 seconds would render as 2h1m0s
    • 7201 seconds would render as 2h0m1s
    • 7261 seconds would render as 2h1m1s

Describe alternatives you've considered

  • Always reduce the output to the two (?) highest components to make it consistent but compact without loosing too much significant information. Probably viable but would kind of break the show_milliseconds config
    • 7290 seconds would render as 2h1m
    • 90100 seconds would render as 1d1h
  • Leave it as it is. Has the advantage of being no change and no work, but the disadvantage of being inconsistent to scan for no real gain

I would be happy to implement this

@LionC LionC added the ✨ enhancement A new feature implementation. label Mar 6, 2024
@LionC LionC changed the title Make render_time firmat more consistend Make render_time format more consistent Mar 6, 2024
@LionC LionC linked a pull request Mar 6, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement A new feature implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant