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

Extract the prometheus endpoint #6843

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Krayt78
Copy link
Contributor

@Krayt78 Krayt78 commented Dec 11, 2024

Description

Extract the prometheus endpoint launching outside the test, as we already do with valgrind and pyroscope.
This is a PR for #3600

@Krayt78 Krayt78 changed the title first pass at removing bool and added module Extract the prometheus endpoint Dec 11, 2024
@Krayt78 Krayt78 marked this pull request as ready for review December 12, 2024 12:57
@Krayt78
Copy link
Contributor Author

Krayt78 commented Dec 13, 2024

Hi @AndreiEres ! Could i get a first review of this please ? all tests are passing but i cant get pyroscope or prometheus to show data on my graphana, might be a skill issue on my end
to use the new prometheus you just need to add --prometheus in the cli for the tests

use color_eyre::eyre;

/// Show if the app is running under Prometheus monitoring
pub(crate) fn is_prometheus_running() -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we need it

}

/// Relaunch the app in Prometheus monitoring mode
pub(crate) fn relaunch_in_prometheus_mode() -> eyre::Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to relaunch the bench. I assume you copied the approach with Valgrind, where we should relaunch the bench. Here, it's sufficient to initialize the endpoint.

@@ -101,6 +102,10 @@ struct BenchCli {
/// Enable Cache Misses Profiling with Valgrind. Linux only, Valgrind must be in the PATH
pub cache_misses: bool,

#[clap(long, default_value_t = false)]
/// Enable prometheus
pub prometheus: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

We need a port here as well

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