Skip to content

Commit

Permalink
fix(metrics): Remove resource usage check for skipping bpf metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Vimal Kumar <[email protected]>
  • Loading branch information
vimalk78 committed Sep 19, 2024
1 parent daa0a63 commit 987a139
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,8 @@ func UpdateProcessBPFMetrics(bpfExporter bpf.Exporter, processStats map[uint64]*
comm := C.GoString((*C.char)(unsafe.Pointer(&ct.Comm)))

if ct.Pid != 0 {
klog.V(6).Infof("process %s (pid=%d, cgroup=%d) has %d CPU cycles, %d instructions, %d cache misses, %d page cache hits",
comm, ct.Pid, ct.CgroupId, ct.CpuCycles, ct.CpuInstr, ct.CacheMiss, ct.PageCacheHit)
}
// skip process without resource utilization
if ct.CacheMiss == 0 && ct.PageCacheHit == 0 {
continue
klog.V(6).Infof("process %s (pid=%d, cgroup=%d) has %d process run time, %d CPU cycles, %d instructions, %d cache misses, %d page cache hits",
comm, ct.Pid, ct.CgroupId, ct.ProcessRunTime, ct.CpuCycles, ct.CpuInstr, ct.CacheMiss, ct.PageCacheHit)
}

// if the pid is within a container, it will have a container ID
Expand Down

0 comments on commit 987a139

Please sign in to comment.