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

Add a semantic warning for printing stats maps with top/div args #1433

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

suyuee
Copy link
Contributor

@suyuee suyuee commented Jul 22, 2020

Both top and div are ambiguous when printing stats maps. top does not
specify which statistic it's based on and it would cause confusion to define a
default behavior for it. As for div, it would also somehow be strange: if use
div on all three statistics, then the output does not have avg * count == sum
anymore; if only on sum and avg, it might be misleading.

Related to #1416.

Checklist
  • Language changes are updated in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md

@suyuee suyuee force-pushed the print_stats_map_args_check branch from 96b111c to a608794 Compare July 22, 2020 21:40
@suyuee suyuee force-pushed the print_stats_map_args_check branch 2 times, most recently from 4fe5b7f to 98f80d4 Compare July 22, 2020 23:09
Both `top` and `div` are ambiguous when printing stats maps. `top` does not
specify which statistic it's based on and it would cause confusion to define a
default behavior for it. As for `div`, it would also somehow be strange: if use
`div` on all three statistics, then the output does not have avg * count == sum
anymore; if only on sum and avg, it might be misleading.
@suyuee suyuee force-pushed the print_stats_map_args_check branch from 98f80d4 to 662f93f Compare July 22, 2020 23:56
@suyuee
Copy link
Contributor Author

suyuee commented Jul 23, 2020

Updated CHANGELOG.md

@danobi danobi merged commit 76e29bf into bpftrace:master Jul 23, 2020
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.

2 participants