MCPcopy Index your code
hub / github.com/coder/coder / percent

Function percent

coderd/agentapi/resourcesmonitor/resources_monitor.go:126–129  ·  view source on GitHub ↗
(numerator, denominator T)

Source from the content-addressed store, hash-verified

124}
125
126func percent[T int](numerator, denominator T) int {
127 percent := float64(numerator*100) / float64(denominator)
128 return int(math.Round(percent))
129}

Callers 1

NextStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected