Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
  • Loading branch information
Sylfrena and kakkoyun committed Feb 16, 2022
1 parent 1401dd8 commit df16bb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/profiler/profiler.go
Expand Up @@ -102,10 +102,10 @@ func NewCgroupProfiler(
mtx: &sync.RWMutex{},
missingStacks: promauto.With(reg).NewCounterVec(
prometheus.CounterOpts{
Name: "parca_agent_profiler_missing_stacks",
Name: "parca_agent_profiler_missing_stacks_total",
Help: "Number of missing profile stacks",
},
[]string{"stacktype"}),
[]string{"type"}),
}
}

Expand Down Expand Up @@ -312,7 +312,7 @@ func (p *CgroupProfiler) profileLoop(ctx context.Context, now time.Time, counts,

stackBytes, err := stackTraces.GetValue(unsafe.Pointer(&userStackID))
if err != nil {
p.missingStacks.WithLabelValues("userstack").Inc()
p.missingStacks.WithLabelValues("user").Inc()
continue
}

Expand All @@ -326,7 +326,7 @@ func (p *CgroupProfiler) profileLoop(ctx context.Context, now time.Time, counts,
if kernelStackID >= 0 {
stackBytes, err = stackTraces.GetValue(unsafe.Pointer(&kernelStackID))
if err != nil {
p.missingStacks.WithLabelValues("kernelstack").Inc()
p.missingStacks.WithLabelValues("kernel").Inc()
continue
}

Expand Down

0 comments on commit df16bb4

Please sign in to comment.