1
0
Fork 0

Collecting task wait time for workers is no longer necessary

This commit is contained in:
Gregory Eremin 2015-10-27 04:00:41 +03:00
parent 7432c5e0d8
commit 3033508706
1 changed files with 0 additions and 4 deletions

View File

@ -108,7 +108,6 @@ func (s *Satan) StopDaemons() {
close(s.queue)
fmt.Println(s.runtimeStats.Fetch(stats.Latency))
fmt.Println(s.runtimeStats.Fetch(stats.TaskWait))
}
func (s *Satan) runWorker() {
@ -123,11 +122,8 @@ func (s *Satan) runWorker() {
}()
for {
start := time.Now()
select {
case t := <-s.queue:
dur := time.Now().UnixNano() - start.UnixNano()
s.runtimeStats.Add(stats.TaskWait, time.Duration(dur))
s.processTask(t)
case <-s.shutdownWorkers:
return