diff --git a/examples/block-sample/main.go b/examples/block-sample/main.go index d47e6e0..6a202e4 100644 --- a/examples/block-sample/main.go +++ b/examples/block-sample/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "fmt" "os" "runtime" @@ -18,6 +19,10 @@ func main() { } func run() error { + labels := pprof.Labels("test_label", "test_value") + ctx := pprof.WithLabels(context.Background(), labels) + pprof.SetGoroutineLabels(ctx) + runtime.SetBlockProfileRate(int((40 * time.Microsecond).Nanoseconds())) done := make(chan struct{}) g := errgroup.Group{} diff --git a/heap.md b/heap.md index e02a1ad..6bbf70c 100644 --- a/heap.md +++ b/heap.md @@ -2,6 +2,10 @@ Totally a work in progress ... !!! Please come back later : ). +https://twitter.com/felixge/status/1355846360562589696 + + + ## How does it work? Look at the go source code to understand how the data is captured, what role runtime.MemProfileRate plays, etc.