Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed May 15, 2024
1 parent 8eef9fc commit 7584c41
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/proc/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package proc

import (
// "os"
"fmt"
"regexp"
"github.com/prometheus/procfs"

Expand Down Expand Up @@ -87,7 +85,6 @@ func findProcessByName(regex string) ([]int, error) {
func aggregateCPUTime(pids []int) (float64, error) {
totalCPUTime := 0.0
for _, pid := range pids {
fmt.Printf("Cpu pid: %d\n", pid)
proc, err := procfs.NewProc(pid)
if err != nil {
return 0, err
Expand All @@ -104,7 +101,6 @@ func aggregateCPUTime(pids []int) (float64, error) {
func aggregateResidentMemoryUsage(pids []int) (uint64, error) {
totalMemory := uint64(0)
for _, pid := range pids {
fmt.Printf("Memory pid: %d\n", pid)
proc, err := procfs.NewProc(pid)
if err != nil {
return 0, err
Expand Down

0 comments on commit 7584c41

Please sign in to comment.