MCPcopy Create free account
hub / github.com/github/gh-aw / formatCompactAIC

Function formatCompactAIC

pkg/cli/logs_format_compact.go:387–401  ·  view source on GitHub ↗
(value float64)

Source from the content-addressed store, hash-verified

385}
386
387func formatCompactAIC(value float64) string {
388 if value <= 0 {
389 return "-"
390 }
391 if value >= 1000 {
392 return fmt.Sprintf("%.1fK", value/1000)
393 }
394 if value >= 10 {
395 return fmt.Sprintf("%.1f", value)
396 }
397 if value >= 1 {
398 return fmt.Sprintf("%.2f", value)
399 }
400 return fmt.Sprintf("%.3f", value)
401}

Callers 2

renderLogsCompactFunction · 0.85
renderLogsCompactVerboseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected