INNER CODE UNIT · Go
seconds
simagix/hatchet · audit_template.go:483
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 {
totalImpact = seconds
}
}
}
} else if key == "collscan" && len(docs) > 0 {
html += "Let's move to the performance evaluation. "
for _, doc := range docs {
if doc.Name == "count" {
html += printer.Sprintf(`I found <span style='color: orange;'>%d</span> with <mark><i>COLLSCAN</i> </mark>plan summary. `, doc.Values[0])
} else if doc.Name == "totalMilli" {
seconds := float64(doc.Values[0].(int)) / 1000
html += printer.Sprintf(`The <i>COLLSCAN</i> caused a total of <span style='color: orange;'>%s</span> wasted. `, gox.GetDurationFromSeconds(seconds))