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

execsnoop: use strftime instead of elapsed #2904

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

makelinux
Copy link
Contributor

@makelinux makelinux commented Jan 7, 2024

because elapsed gives relative time, and strftime gives absolute time which is more readable and practical.

Copy link
Contributor

@viktormalik viktormalik left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Maybe we could just respect the original implementation and use ms instead of ns?

@makelinux
Copy link
Contributor Author

Makes sense to me. Maybe we could just respect the original implementation and use ms instead of ns?

strftime receives integer nanoseconds and provides decimal seconds only in microseconds (six digits). It can't be changed.

Copy link
Member

@danobi danobi left a comment

Choose a reason for hiding this comment

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

seems reasonable to me. but please add changelog entry under "tools" section

because `elapsed` gives relative time,
and `strftime` gives absolute time which
is is more readable and practical.
@viktormalik
Copy link
Contributor

Makes sense to me. Maybe we could just respect the original implementation and use ms instead of ns?

strftime receives integer nanoseconds and provides decimal seconds only in microseconds (six digits). It can't be changed.

Right, that makes sense. Ok, let's stick with us.

@danobi danobi merged commit e68c8e9 into bpftrace:master Jan 12, 2024
19 checks passed
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.

None yet

3 participants