Warn when generating the report takes too long.

This commit is contained in:
Tom Wilkie
2015-09-07 20:35:46 +00:00
parent 57aaf4be6f
commit 953106f80f

View File

@@ -186,6 +186,7 @@ func main() {
r = report.MakeReport()
case <-spyTick:
start := time.Now()
if err := processCache.Update(); err != nil {
log.Printf("error reading processes: %v", err)
}
@@ -198,6 +199,10 @@ func main() {
}
r = Apply(r, taggers)
if took := time.Since(start); took > *spyInterval {
log.Printf("report generation took too long (%s)", took)
}
case <-quit:
return
}