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

Separate Prometheus metrics into global and per-client categories with refactoring #2781

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

cube0x8
Copy link
Contributor

@cube0x8 cube0x8 commented Dec 18, 2024

The aggregated and per-client fuzzing stats were mixed in the Prometheus monitor, either the ones displayed on stderr and the ones served. The metrics were structured to show stats for each client, with Prometheus labels using sender_id.0 as an identifier. However, only the custom_stats were actually per-client, while the rest (e.g., exec/s, objective_count, etc.) were all aggregated. This created confusion.

I separated the metrics into two categories: global metrics and per-client metrics. Now, they are served separately. I also thought it would be nice and beautiful to display the parameter edges_hit/edges_total, so I dared to add it in the custom_stats.

I refactored a bit the monitor here and there.

@domenukk
Copy link
Member

domenukk commented Dec 18, 2024

Needs a good cargo +nightly fmt


impl PrometheusStats {
/// Create a new [`PrometheusStats`] with default values.
pub fn default() -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

See clippy: This should probably be impl Default for PrometheusStats

@domenukk domenukk merged commit df3384d into AFLplusplus:main Dec 19, 2024
103 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