MCPcopy Create free account
hub / github.com/dirk/quickhook / ExampleStart

Function ExampleStart

tracing/tracing_test.go:5–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "time"
4
5func ExampleStart() {
6 finish := Start()
7 span := NewSpan("short")
8 span.end = span.start.Add(time.Nanosecond * 12_300)
9 span = NewSpan("long")
10 span.end = span.start.Add(time.Microsecond * 23_400)
11 finish()
12 // Output:
13 // Traced 2 span(s):
14 // short 12us
15 // long 23ms
16}

Callers

nothing calls this directly

Calls 2

StartFunction · 0.85
NewSpanFunction · 0.85

Tested by

no test coverage detected