diff --git a/Cargo.lock b/Cargo.lock index 89f3561bc..a6b22871f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2564,7 +2564,6 @@ dependencies = [ "platform-dirs", "prometheus", "puffin", - "puffin_http", "rand", "rayon", "regex", @@ -3236,18 +3235,6 @@ dependencies = [ "serde", ] -[[package]] -name = "puffin_http" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bffc600c35913d282ae1e96a6ffcdf36dc7a7cdb9310e0ba15914d258c8193" -dependencies = [ - "anyhow", - "crossbeam-channel", - "log", - "puffin", -] - [[package]] name = "quote" version = "1.0.32" diff --git a/meilisearch/Cargo.toml b/meilisearch/Cargo.toml index a2536a52f..35a4a4304 100644 --- a/meilisearch/Cargo.toml +++ b/meilisearch/Cargo.toml @@ -69,8 +69,7 @@ permissive-json-pointer = { path = "../permissive-json-pointer" } pin-project-lite = "0.2.9" platform-dirs = "0.3.0" prometheus = { version = "0.13.3", features = ["process"] } -puffin = "0.16.0" -puffin_http = { version = "0.13.0", optional = true } +puffin = { version = "0.16.0", features = ["serialization"] } rand = "0.8.5" rayon = "1.7.0" regex = "1.7.3" @@ -135,7 +134,6 @@ zip = { version = "0.6.4", optional = true } [features] default = ["analytics", "meilisearch-types/all-tokenizations", "mini-dashboard"] analytics = ["segment"] -profile-with-puffin = ["dep:puffin_http"] mini-dashboard = [ "actix-web-static-files", "static-files", diff --git a/meilisearch/src/main.rs b/meilisearch/src/main.rs index a3905d451..b53335ed2 100644 --- a/meilisearch/src/main.rs +++ b/meilisearch/src/main.rs @@ -30,9 +30,7 @@ fn setup(opt: &Opt) -> anyhow::Result<()> { async fn main() -> anyhow::Result<()> { let (opt, config_read_from) = Opt::try_build()?; - #[cfg(feature = "profile-with-puffin")] - let _server = puffin_http::Server::new(&format!("0.0.0.0:{}", puffin_http::DEFAULT_PORT))?; - puffin::set_scopes_on(cfg!(feature = "profile-with-puffin")); + puffin::set_scopes_on(opt.experimental_profile_with_puffin); anyhow::ensure!( !(cfg!(windows) && opt.experimental_reduce_indexing_memory_usage),