1
0
mirror of https://github.com/DataDog/go-profiler-notes.git synced 2025-07-15 23:54:16 +02:00

Initial work on new guide

This commit is contained in:
Felix Geisendörfer
2021-09-08 11:25:15 +02:00
parent 74c8c4298c
commit fd511c528d
33 changed files with 11311 additions and 0 deletions

27
examples/guide/main2.go Normal file
View File

@ -0,0 +1,27 @@
package main
import (
"os"
"runtime/trace"
"time"
)
func main() {
trace.Start(os.Stdout)
defer trace.Stop()
go b()
a()
}
func a() {
start := time.Now()
for time.Since(start) < time.Second {
}
}
func b() {
start := time.Now()
for time.Since(start) < time.Second {
}
}