MCPcopy
hub / github.com/runfinch/finch / Add

Method Add

benchmark/benchmark.go:43–50  ·  view source on GitHub ↗

Add combines the values of the current Metrics instance with the values of another Metrics instance passed as an argument. It updates the current instance's fields by adding the corresponding values from the other instance.

(other Metrics)

Source from the content-addressed store, hash-verified

41// of another Metrics instance passed as an argument. It updates the current
42// instance's fields by adding the corresponding values from the other instance.
43func (m *Metrics) Add(other Metrics) {
44 m.PeakCPUUsage += other.PeakCPUUsage
45 m.AverageCPUUsage += other.AverageCPUUsage
46 m.TotalCPUTime += other.TotalCPUTime
47 m.PeakMemUsage += other.PeakMemUsage
48 m.AverageMemUsage += other.AverageMemUsage
49 m.DiskUsageDelta += other.DiskUsageDelta
50}
51
52// GetSubject returns the testing subject based on INSTALLED flag.
53func GetSubject() (string, error) {

Callers 3

WrapperFunction · 0.95
measureMetricsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected