diff --git a/ffmpeg/parse/parser.go b/ffmpeg/parse/parser.go index 7914b082..f18aa335 100644 --- a/ffmpeg/parse/parser.go +++ b/ffmpeg/parse/parser.go @@ -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 diff --git a/process/process.go b/process/process.go index ff531004..3fb8e56d 100644 --- a/process/process.go +++ b/process/process.go @@ -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) } diff --git a/psutil/process.go b/psutil/process.go index c0d5babf..962b3080 100644 --- a/psutil/process.go +++ b/psutil/process.go @@ -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) + */ } } }