mirror of
https://github.com/datarhei/core.git
synced 2025-11-02 20:24:02 +08:00
Remove debug output
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user