First iteration on exposing puffin profiling

This commit is contained in:
Kerollmops
2023-07-10 18:41:54 +02:00
parent 9daccdf7f0
commit eef95de30e
33 changed files with 210 additions and 17 deletions

View File

@ -67,6 +67,8 @@ 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 = "0.13.0"
rand = "0.8.5"
rayon = "1.7.0"
regex = "1.7.3"

View File

@ -29,6 +29,9 @@ fn setup(opt: &Opt) -> anyhow::Result<()> {
async fn main() -> anyhow::Result<()> {
let (opt, config_read_from) = Opt::try_build()?;
puffin::set_scopes_on(true);
let _server = puffin_http::Server::new(&format!("0.0.0.0:{}", puffin_http::DEFAULT_PORT))?;
anyhow::ensure!(
!(cfg!(windows) && opt.experimental_reduce_indexing_memory_usage),
"The `experimental-reduce-indexing-memory-usage` flag is not supported on Windows"