| 22 | #include "flow/actorcompiler.h" // has to be last include |
| 23 | |
| 24 | Counter::Counter(std::string const& name, CounterCollection& collection) |
| 25 | : name(name), interval_start(0), last_event(0), interval_sq_time(0), roughness_interval_start(0), interval_delta(0), |
| 26 | interval_start_value(0) { |
| 27 | metric.init(collection.name + "." + (char)toupper(name.at(0)) + name.substr(1), collection.id); |
| 28 | collection.counters.push_back(this); |
| 29 | } |
| 30 | |
| 31 | void Counter::operator+=(Value delta) { |
| 32 | if (!delta) |