Skip to content

Conversation

@mihaisebea
Copy link

! defaults to nanoseconds
! supports miliseconds and seconds

! defaults to nanoseconds
! supports miliseconds and seconds
@MetanoKid MetanoKid self-requested a review August 30, 2020 08:32
@MetanoKid MetanoKid added the enhancement New feature or request label Aug 30, 2020
Copy link
Owner

@MetanoKid MetanoKid left a comment

Choose a reason for hiding this comment

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

Wow, thank you Mihai!
This is a feature I've been wanting to add myself, I'm glad that you took the initiative.

I've left some comments and suggestions, can you please check them?

Comment on lines 128 to 135
if (timingDisplay == "ms")
{
analysisOptions.TimeDisplay = BuildAnalyzer::TimeDisplayEnum::Mili;
}
else if (timingDisplay == "s")
{
analysisOptions.TimeDisplay = BuildAnalyzer::TimeDisplayEnum::Sec;
}
Copy link
Owner

Choose a reason for hiding this comment

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

Can we show a message when we get other option saying we'll use the default representation (and which one)?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Copy link
Owner

Choose a reason for hiding this comment

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

Can you please add the case where user passes ns as the time unit?
It's currently displaying the Unrecognized time display value although ns is a valid one.
Thank you!

("out_template_instantiations", "Path to output template instantiations data", cxxopts::value(outputPathTemplateInstantiations));
("out_template_instantiations", "Path to output template instantiations data", cxxopts::value(outputPathTemplateInstantiations))
//timing display
("timing", "defaults to ns, can use ms(miliseconds) or s(seconds)", cxxopts::value(timingDisplay))
Copy link
Owner

Choose a reason for hiding this comment

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

Although I like timing, it doesn't feel related to the time unit. How about giving it a name that makes it crystal clear?

Also, some spell-check and tweaks:

  • Description should start in a capital letter.
  • miliseconds -> milliseconds.
  • Consider using ns(nanoseconds), as you've used that format with the other units.

Finally, as mentioned in previous comment, if you consider making s(seconds) the default, please update the description.

Copy link
Author

Choose a reason for hiding this comment

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

Naming is hard :(
display_time_unit ?
the rest are fixed.

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, display_time_unit works!
Please go with it :)

@mihaisebea
Copy link
Author

Thank you very much for taking the time to review my work and for your amazing work.

@MetanoKid
Copy link
Owner

I've been running some tests and found an issue I had overlooked: any of the time units we select will only display the value as an integer.
Say I prefer reasoning in seconds, so I decide to invoke it with s and then go check FunctionCompilations.csv or TemplateInstantiations.csv. Chances are I get a whole lot of 0 in all of the columns and I lose the ability to find out where my build is slow.

What I'd love it to be is:

  • Display as many significant decimals as possible.
  • Only display decimals when there are any: i.e. when invoking it with ns we wouldn't see any decimals at all.

I'm okay with having:

  • Up to 3 or 4 decimals at most: when invoked with s we'd still have data up to milliseconds, which seems enough.
  • Display these decimals even when there are no significant values, if that makes the code easier to reason about.

What do you think?

@MetanoKid MetanoKid added this to the v1.1.0 milestone Sep 4, 2020
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

Successfully merging this pull request may close these issues.

3 participants