From 777bee85fa29119b57986116b6daa92ef4d692f5 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Wed, 31 May 2023 10:54:46 +0300 Subject: [PATCH] to be dropped: tracing-flame second attempt with configuring it no post processing is needed. the time spent in loading is very small so one needs to use: cat .neon/tracing.folded | inferno-flamegraph --minwidth=0 >| flamegraph.svg To find them, otherwise it will be just walreceiver and compaction. Noticed also some trouble with the shutdown propagating from a signal with single threaded runtime; it very likely is that all of the compactions are already spawned, and as they are mostly blocking code, they will block the shutdown procedure, which will be quite late anyways. --- libs/utils/src/logging.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/utils/src/logging.rs b/libs/utils/src/logging.rs index 6935cbace6..39cb07fb61 100644 --- a/libs/utils/src/logging.rs +++ b/libs/utils/src/logging.rs @@ -132,7 +132,15 @@ pub fn init_with_flame( log_layer.with_filter(rust_log_env_filter()) }); let r = r.with(TracingEventCountLayer(&TRACING_EVENT_COUNT).with_filter(rust_log_env_filter())); - let (flame_layer, guard) = tracing_flame::FlameLayer::with_file("./tracing.folded").unwrap(); + let (flame_layer, guard) = { + let (l, guard) = tracing_flame::FlameLayer::with_file("./tracing.folded").unwrap(); + let l = l + .with_empty_samples(true) + .with_module_path(false) + .with_file_and_line(false) + .with_threads_collapsed(true); + (l, guard) + }; let r = r.with(flame_layer); match tracing_error_layer_enablement { TracingErrorLayerEnablement::EnableWithRustLogFilter => {