MCPcopy Index your code
hub / github.com/docker/cli / calculateNetwork

Function calculateNetwork

cli/command/container/stats_helpers.go:232–240  ·  view source on GitHub ↗
(network map[string]container.NetworkStats)

Source from the content-addressed store, hash-verified

230}
231
232func calculateNetwork(network map[string]container.NetworkStats) (float64, float64) {
233 var rx, tx float64
234
235 for _, v := range network {
236 rx += float64(v.RxBytes)
237 tx += float64(v.TxBytes)
238 }
239 return rx, tx
240}
241
242// calculateMemUsageUnixNoCache calculate memory usage of the container.
243// Cache is intentionally excluded to avoid misinterpretation of the output.

Callers 1

collectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…