File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -33,22 +33,17 @@ go get github.com/go-perf/easypprof
33
33
``` go
34
34
func main () {
35
35
cfg := easypprof.Config {
36
- Disable: os.Getenv (" NO_EASY_PPROF" ) == " true" ,
37
36
ProfileMode: easypprof.CpuMode ,
38
37
OutputDir: path.Join (" ." , " test_pprof" ),
39
38
FilePrefix: " my-app" ,
40
- UseTextFormat: false ,
41
- MutexProfileFraction: 12 ,
42
- BlockProfileRate: 100_000,
43
- FgprofFormat: " pprof" ,
44
39
}
45
40
defer easypprof.Start (cfg).Stop ()
46
41
47
42
// your code
48
43
}
49
44
```
50
45
51
- Also see examples: [ examples_test.go] ( https://github.com/go-perf/easypprof/blob/main/example_test.go ) .
46
+ See examples for more : [ examples_test.go] ( https://github.com/go-perf/easypprof/blob/main/example_test.go ) .
52
47
53
48
## Documentation
54
49
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ func ExampleEasyPprof() {
25
25
// Output:
26
26
}
27
27
28
+ func ExampleMinimalVersion () {
29
+ // ProfileMode by default is easypprof.CpuMode
30
+ defer easypprof .Start (easypprof.Config {}).Stop ()
31
+
32
+ // Output:
33
+ }
34
+
28
35
func ExampleEasyPprofWithPause () {
29
36
// default config is used
30
37
p := easypprof .Start (easypprof.Config {})
You can’t perform that action at this time.
0 commit comments