You've already forked go-profiler-notes
mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2025-07-15 23:54:16 +02:00
small tweaks
This commit is contained in:
@ -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{}
|
||||
|
Reference in New Issue
Block a user