-
Notifications
You must be signed in to change notification settings - Fork 392
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
Add an option to specify time format #102
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #102 +/- ##
==========================================
- Coverage 85.76% 85.70% -0.06%
==========================================
Files 1 1
Lines 2452 2449 -3
==========================================
- Hits 2103 2099 -4
- Misses 349 350 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
24a8507
to
4750704
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
I actually wonder if --time-format
option is worthwhile, but have no strong opinion either way.
gprof2dot.py
Outdated
@@ -44,6 +44,7 @@ | |||
|
|||
|
|||
MULTIPLICATION_SIGN = chr(0xd7) | |||
TIME_FORMAT = "%.7g" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given TIME_FORMAT
is not a constant, but rather a variable, please rename it to timeFormat
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
str(float) prints 16 decimal places, which is too verbose and much more than the precision in the profiles. Print 7 digits by default and allow setting the format with --time-format.
4750704
to
cc55157
Compare
I think picking a format that pleases everyone can be hard and it's easy to make it configurable, so we can avoid arguing about it. |
@jrfonseca please take another look btw, |
Good point. Merged. Thanks. |
Thank you |
str(float) prints 16 decimal places, which is too verbose and much more than the precision in the profiles. Print 7 digits by default and allow setting the format with --time-format.