INNER CODE UNIT · Go
seconds
simagix/hatchet · audit_template.go:471
seconds := float64(milli) / 1000
html += printer.Sprintf("<span style='color: orange;'>%s</span>. ", gox.GetDurationFromSeconds(seconds))
}
} else if doc.Name == "avgMilli" && doc.Values[0].(int) > 0 {
milli := doc.Values[0].(int)
html += printer.Sprintf("Moreover, the average operation time was <span style='color: orange;'>%d</span> milliseconds", milli)
if milli > 100 {
html += `, where operation time <mark>greater than 100 milliseconds is, IMO, "slow"</mark>. `
} else {
html += ". "
}
} else if doc.Name == "totalMilli" && doc.Values[0].(int) > 0 {
seconds := float64(doc.Values[0].(int)) / 1000
if seconds < (10 * 60) { // should be calculated with duration
html += printer.Sprintf("The total impact time from slowest operations was %s. ", gox.GetDurationFromSeconds(seconds))
} else if seconds < (60 * 60) {
html += printer.Sprintf("The total impact time from slowest operations was, ouch, <span style='color: orange;'>%s</span>. ", gox.GetDurationFromSeconds(seconds))
} else {