-
Notifications
You must be signed in to change notification settings - Fork 480
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
info: Change elapsed time format in info #393
base: master
Are you sure you want to change the base?
Conversation
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.
The reason I did this is to provide precise time. The suggested format is more readable but loose some precison.
cmds/record.c
Outdated
#define SEC_TO_NSEC (1000000000ULL) | ||
|
||
char *elapsed_time = NULL; | ||
static char *elapsed_fmt_time = NULL; |
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.
Why did you make it static?
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.
Right, it's not needed. Thanks.
b52c574
to
51c3876
Compare
I see. What about showing it as follows then?
|
This patch changes elapsed time format more like replay output. Before: $ uftrace info ... # elapsed time : 0.003219479 sec # cpu time : 0.000 / 0.003 sec (sys / user) ... After: $ uftrace info ... # elapsed time : 0.004970269 sec (4.970 ms) # cpu time : 0.004 / 0.000 sec (sys / user) ... Signed-off-by: Honggyu Kim <[email protected]>
51c3876
to
cfc84ef
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.
I hope it could share the code with __print_time_unit()
as well.
This patch changes elapsed time format more like replay output.
Before:
After:
Signed-off-by: Honggyu Kim [email protected]