Skip to content

Commit

Permalink
Disable inlining for golang example (#211)
Browse files Browse the repository at this point in the history
Otherwise, work function is inlined (go1.16.4 windows/amd64)
and flamegraph becomes slightly less demonstrative.
  • Loading branch information
kolesnikovae committed May 24, 2021
1 parent 99d76c2 commit 80a334a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/golang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/pyroscope-io/pyroscope/pkg/agent/profiler"
)

//go:noinline
func work(n int) {
// revive:disable:empty-block this is fine because this is a example app, not real production code
for i := 0; i < n; i++ {
Expand Down

0 comments on commit 80a334a

Please sign in to comment.