MCPcopy Create free account
hub / github.com/ElementsProject/lightning / main

Function main

common/test/run-trace.c:8–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 * introduces. */
7
8int main(int argx, char *argv[])
9{
10 /* Just some context objects to hang spans off of. */
11 int a = 0, b = 0, c = 0, d = 0;
12
13 common_setup(argv[0]);
14
15 /* Create a bunch of nested spans to emit. */
16 for(int i=0; i<2500000; i++) {
17 trace_span_start("a", &a);
18 trace_span_tag(&a, "method", "getrawblockbyheight");
19 trace_span_start("b", &b);
20 trace_span_tag(&b, "method", "getrawblockbyheight");
21
22 trace_span_start("c", &c);
23 trace_span_tag(&c, "method", "getrawblockbyheight");
24 trace_span_end(&c);
25
26 trace_span_end(&b);
27
28 trace_span_start("d", &d);
29 trace_span_tag(&d, "method", "getrawblockbyheight");
30 trace_span_end(&d);
31
32 trace_span_end(&a);
33 }
34 trace_cleanup();
35 common_shutdown();
36}

Callers

nothing calls this directly

Calls 5

common_setupFunction · 0.85
trace_span_tagFunction · 0.85
trace_span_endFunction · 0.85
trace_cleanupFunction · 0.85
common_shutdownFunction · 0.85

Tested by

no test coverage detected