MCPcopy Create free account
hub / github.com/Icinga/icinga2 / Apply

Method Apply

lib/livestatus/stdaggregator.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void StdAggregator::Apply(const Table::Ptr& table, const Value& row, AggregatorState **state)
22{
23 Column column = table->GetColumn(m_StdAttr);
24
25 Value value = column.ExtractValue(row);
26
27 StdAggregatorState *pstate = EnsureState(state);
28
29 pstate->StdSum += value;
30 pstate->StdQSum += pow(value, 2);
31 pstate->StdCount++;
32}
33
34double StdAggregator::GetResultAndFreeState(AggregatorState *state) const
35{

Callers

nothing calls this directly

Calls 2

GetColumnMethod · 0.80
ExtractValueMethod · 0.45

Tested by

no test coverage detected