summaryrefslogtreecommitdiff
path: root/internal/flamegraph/flamegraph.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-03-29 18:19:06 +0200
committerPaul Buetow <paul@buetow.org>2025-03-29 18:19:06 +0200
commitb8ac7c88b203ba5475cbca63669ce654c2ed49ea (patch)
tree3fc6d2539ced1d4012f9bf0fe69d4d191e2a5049 /internal/flamegraph/flamegraph.go
parentdc5c405f6afb9fc59ba73e7dbc7cd3564983ae6e (diff)
flags is now a singleton
Diffstat (limited to 'internal/flamegraph/flamegraph.go')
-rw-r--r--internal/flamegraph/flamegraph.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/flamegraph/flamegraph.go b/internal/flamegraph/flamegraph.go
index 9e1e14b..aeb5143 100644
--- a/internal/flamegraph/flamegraph.go
+++ b/internal/flamegraph/flamegraph.go
@@ -18,7 +18,7 @@ type Flamegraph struct {
workers []worker
}
-func New(flags flags.Flags) Flamegraph {
+func New() Flamegraph {
f := Flamegraph{
Ch: make(chan *event.Pair, 4096),
Done: make(chan struct{}),
@@ -41,7 +41,7 @@ func (f Flamegraph) Start(ctx context.Context) {
for i, worker := range f.workers {
fmt.Println("Starting flamegraph worker", i)
- if f.flags.FlamegraphName == "" { // Empty string means: old style collapsed
+ if flags.Get().FlamegraphName == "" { // Empty string means: old style collapsed
go worker.runCollapsed(ctx, &wg, f.Ch)
} else {
go worker.run(ctx, &wg, f.Ch)