Remove debug output

This commit is contained in:
Ingo Oppermann
2023-04-25 16:25:21 +02:00
parent b70382c40b
commit 74f582e4b4
3 changed files with 5 additions and 15 deletions

View File

@@ -571,7 +571,6 @@ func (p *parser) parseAVstreamProgress(line string) error {
}
func (p *parser) Stop(state string, pusage process.Usage) {
fmt.Printf("%+v\n", pusage)
usage := Usage{}
usage.CPU.Average = pusage.CPU.Average

View File

@@ -500,12 +500,8 @@ func (p *process) start() error {
// Stop any restart timer in order to start the process immediately
p.unreconnect()
fmt.Printf("q\n")
p.setState(stateStarting)
fmt.Printf("w\n")
args := p.args
p.callbacks.lock.Lock()
@@ -517,8 +513,6 @@ func (p *process) start() error {
}
p.callbacks.lock.Unlock()
fmt.Printf("e\n")
// Start the stop timeout if enabled
if p.timeout > time.Duration(0) {
p.stopTimerLock.Lock()
@@ -536,8 +530,6 @@ func (p *process) start() error {
p.stopTimerLock.Unlock()
}
fmt.Printf("r\n")
p.cmd = exec.Command(p.binary, args...)
p.cmd.Env = []string{}
@@ -565,7 +557,6 @@ func (p *process) start() error {
p.pid = int32(p.cmd.Process.Pid)
if proc, err := psutil.NewProcess(p.pid, false); err == nil {
fmt.Printf("starting limiter\n")
p.limits.Start(proc)
}

View File

@@ -2,7 +2,6 @@ package psutil
import (
"context"
"fmt"
"math"
"sync"
"time"
@@ -86,11 +85,12 @@ func (p *process) tick(ctx context.Context, interval time.Duration) {
p.statPrevious, p.statCurrent = p.statCurrent, stat
p.statPreviousTime, p.statCurrentTime = p.statCurrentTime, t
p.lock.Unlock()
/*
pct, _ := p.CPUPercent()
pcpu := (pct.System + pct.User + pct.Other) / 100
pct, _ := p.CPUPercent()
pcpu := (pct.System + pct.User + pct.Other) / 100
fmt.Printf("%d\t%0.2f%%\n", p.pid, pcpu*100*p.ncpu)
fmt.Printf("%d\t%0.2f%%\n", p.pid, pcpu*100*p.ncpu)
*/
}
}
}