1
0
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:
Felix Geisendörfer
2021-02-08 15:10:43 +01:00
parent bbef4f210c
commit f0ad919665
2 changed files with 9 additions and 0 deletions

View File

@ -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{}