MCPcopy Create free account
hub / github.com/google/pprof / percentText

Function percentText

internal/driver/html/stacks.js:583–588  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

581 // percentText returns text that displays v in appropriate units alongside its
582 // percentage.
583 function percentText(v) {
584 function percent(v, total) {
585 return Number(((100.0 * v) / total).toFixed(1)) + '%';
586 }
587 return unitText(v) + " (" + percent(v, stacks.Total) + ")";
588 }
589
590 // unitText returns a formatted string to display for value.
591 function unitText(value) {

Callers 4

clearDetailsFunction · 0.85
summaryFunction · 0.85
detailsFunction · 0.85
diffTextFunction · 0.85

Calls 2

unitTextFunction · 0.85
percentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…