MCPcopy Create free account
hub / github.com/containerd/nerdctl / RenderEntry

Function RenderEntry

pkg/statsutil/stats.go:135–146  ·  view source on GitHub ↗

Rendering a FormattedStatsEntry from StatsEntry

(in *StatsEntry, noTrunc bool)

Source from the content-addressed store, hash-verified

133
134// Rendering a FormattedStatsEntry from StatsEntry
135func RenderEntry(in *StatsEntry, noTrunc bool) FormattedStatsEntry {
136 return FormattedStatsEntry{
137 Name: in.EntryName(noTrunc),
138 ID: in.EntryID(noTrunc),
139 CPUPerc: in.CPUPerc(),
140 MemUsage: in.MemUsage(),
141 MemPerc: in.MemPerc(),
142 NetIO: in.NetIO(),
143 BlockIO: in.BlockIO(),
144 PIDs: in.PIDs(),
145 }
146}
147
148/*
149a set of functions to format container stats

Callers 1

StatsFunction · 0.92

Calls 8

EntryNameMethod · 0.80
EntryIDMethod · 0.80
CPUPercMethod · 0.80
MemUsageMethod · 0.80
MemPercMethod · 0.80
NetIOMethod · 0.80
BlockIOMethod · 0.80
PIDsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…