MCPcopy Create free account
hub / github.com/Shopify/goose / ExampleNewProfiler

Function ExampleNewProfiler

profiler/profiler_test.go:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "github.com/Shopify/goose/profiler"
4
5func ExampleNewProfiler() {
6 cpuFile := "cpu.prof"
7 memoryFile := "memory.prof"
8
9 p := profiler.NewProfiler(cpuFile, memoryFile)
10 if err := p.Start(); err != nil {
11 panic(err)
12 }
13
14 // Do stuff
15
16 if err := p.End(); err != nil {
17 panic(err)
18 }
19}

Callers

nothing calls this directly

Calls 3

StartMethod · 0.95
EndMethod · 0.95
NewProfilerFunction · 0.92

Tested by

no test coverage detected