MCPcopy Create free account
hub / github.com/Firstyear/opensuse-proxy-cache / main

Function main

opensuse-proxy-cache/src/main.rs:2029–2055  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2027
2028#[tokio::main(flavor = "multi_thread")]
2029async fn main() {
2030 #[cfg(feature = "dhat-heap")]
2031 let file_name = format!("/tmp/dhat/heap-{}.json", std::process::id());
2032 #[cfg(feature = "dhat-heap")]
2033 let _profiler = dhat::Profiler::builder()
2034 .trim_backtraces(Some(4))
2035 .file_name(file_name)
2036 .build();
2037
2038 use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry};
2039 let filter_layer = EnvFilter::try_from_default_env()
2040 .or_else(|_| EnvFilter::try_new("info"))
2041 .unwrap();
2042
2043 let fmt_layer = tracing_forest::ForestLayer::default();
2044 // let fmt_layer = tracing_subscriber::fmt::layer().with_target(true);
2045
2046 // let console_layer = ConsoleLayer::builder().with_default_env().spawn();
2047
2048 Registry::default()
2049 // .with(console_layer)
2050 .with(filter_layer)
2051 .with(fmt_layer)
2052 .init();
2053
2054 do_main().await;
2055}

Callers

nothing calls this directly

Calls 1

do_mainFunction · 0.70

Tested by

no test coverage detected