Skip to content

Commit d046c97

Browse files
committed
Minimal example
1 parent 39b77a5 commit d046c97

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,17 @@ go get github.com/go-perf/easypprof
3333
```go
3434
func main() {
3535
cfg := easypprof.Config{
36-
Disable: os.Getenv("NO_EASY_PPROF") == "true",
3736
ProfileMode: easypprof.CpuMode,
3837
OutputDir: path.Join(".", "test_pprof"),
3938
FilePrefix: "my-app",
40-
UseTextFormat: false,
41-
MutexProfileFraction: 12,
42-
BlockProfileRate: 100_000,
43-
FgprofFormat: "pprof",
4439
}
4540
defer easypprof.Start(cfg).Stop()
4641

4742
// your code
4843
}
4944
```
5045

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).
5247

5348
## Documentation
5449

example_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ func ExampleEasyPprof() {
2525
// Output:
2626
}
2727

28+
func ExampleMinimalVersion() {
29+
// ProfileMode by default is easypprof.CpuMode
30+
defer easypprof.Start(easypprof.Config{}).Stop()
31+
32+
// Output:
33+
}
34+
2835
func ExampleEasyPprofWithPause() {
2936
// default config is used
3037
p := easypprof.Start(easypprof.Config{})

0 commit comments

Comments
 (0)