Skip to content

Commit 94b11f3

Browse files
chore: fmt
1 parent e33723c commit 94b11f3

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

crates/iota-benchmark/src/bin/flamegraph.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use std::alloc::System;
5+
56
use telemetry_subscribers::flamegraph::CounterAlloc;
67
#[global_allocator]
78
static GLOBAL: CounterAlloc<System> = CounterAlloc::new(System);
@@ -25,10 +26,8 @@ async fn main() {
2526

2627
// follow instructions in telemetry-subscribers README how to setup grafana to
2728
// visualize the flamegraphs
28-
// println!(
29-
// "{}",
30-
// serde_json::to_string_pretty(&sub.get_nested_sets("iota-benchmark::flamegraph")).unwrap()
31-
// );
29+
// let nested_sets = sub.get_nested_sets("iota-benchmark::flamegraph");
30+
// println!("{}", serde_json::to_string_pretty(&nested_sets).unwrap());
3231
// println!();
3332
println!(
3433
"{}",

crates/telemetry-subscribers/src/flamegraph.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ mod svg;
1212
mod tracing;
1313
#[cfg(feature = "flamegraph-alloc")]
1414
pub use alloc::{AllocMetrics, CounterAlloc, get_alloc_metrics};
15+
1516
pub use grafana::NestedSetFrame;
1617
pub use svg::{Config as SvgConfig, Svg};
1718
pub use tracing::FlameSub;

crates/telemetry-subscribers/src/flamegraph/svg.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use std::time::Duration;
5+
56
#[cfg(feature = "flamegraph-alloc")]
67
use super::alloc::AllocMetrics;
78

@@ -224,8 +225,8 @@ where
224225
samples: 1,
225226
start: Default::default(),
226227
total: raw.total,
227-
#[cfg(feature = "flamegraph-alloc")]
228-
alloc: AllocMetrics::new(),
228+
#[cfg(feature = "flamegraph-alloc")]
229+
alloc: AllocMetrics::new(),
229230
});
230231
Some(raw.render(caption, config))
231232
}

0 commit comments

Comments
 (0)