MCPcopy Create free account
hub / github.com/hashintel/hash / init_tracing

Function init_tracing

tests/graph/benches/graph/lib.rs:39–62  ·  view source on GitHub ↗
(scenario: &str, bench: &str)

Source from the content-addressed store, hash-verified

37use self::scenario::run_scenario_file;
38
39fn init_tracing(scenario: &str, bench: &str) -> impl Drop {
40 TelemetryRegistry::default()
41 .with_error_layer()
42 .with_console_logging(ConsoleConfig {
43 enabled: true,
44 format: LogFormat::Pretty,
45 level: None,
46 color: ColorOption::Auto,
47 stream: ConsoleStream::Stderr,
48 })
49 .with_otlp(
50 OtlpConfig {
51 endpoint: Some("http://localhost:4317".to_owned()),
52 },
53 "Graph Benches",
54 )
55 .with_flamegraph(Path::new("out").join(generate_path(
56 "scenarios",
57 Some(scenario),
58 Some(bench),
59 )))
60 .init()
61 .expect("Failed to initialize tracing")
62}
63
64#[criterion]
65fn scenarios(criterion: &mut Criterion) {

Callers 1

run_scenarioFunction · 0.50

Calls 10

generate_pathFunction · 0.85
with_flamegraphMethod · 0.80
with_otlpMethod · 0.80
with_console_loggingMethod · 0.80
with_error_layerMethod · 0.80
defaultFunction · 0.50
expectMethod · 0.45
initMethod · 0.45
to_ownedMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected