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

counters: add support for counting bools #1651

Merged
merged 2 commits into from
Mar 7, 2024
Merged

counters: add support for counting bools #1651

merged 2 commits into from
Mar 7, 2024

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Mar 7, 2024

Currently, we have a bunch of ringbuf enum variants with single bool fields, like Trace::NICPowerEnableLow(bool) in gimlet-seq-server. This commit adds a counters::Count implementation for bool, allowing us to place #[count(children)] on these variants and generate separate true and false counters for them.

Currently, we have a bunch of ringbuf enum variants with single `bool`
fields, like `Trace::NICPowerEnableLow(bool)` in `gimlet-seq-server`.
This commit adds a `counters::Count` implementation for `bool`, allowing
us to place `#[count(children)]` on these variants and generate separate
`true` and `false` counters for them.
@hawkw hawkw requested review from cbiffle and mkeeter March 7, 2024 19:44
Copy link
Collaborator

@mkeeter mkeeter left a comment

Choose a reason for hiding this comment

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

Neat!

@hawkw hawkw enabled auto-merge (squash) March 7, 2024 21:09
@hawkw hawkw merged commit 4aad369 into master Mar 7, 2024
83 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.

2 participants