Lines Matching defs:counter
107 // Returns true if the counter was persisted.
108 bool Log(uint64_t metric_id, const RemoteCounter::EventBuffer& counter) override {
110 counters_->InsertOrUpdateEntry(metric_id, counter.metadata()[0].event_type,
111 counter.metadata()[0].event_type_index,
112 [&counter](fbl::unique_ptr<BaseCounter>* persisted) {
116 (*persisted)->Increment(counter.event_data());
159 auto counter = collector.AddCounter(/*metric_id=*/1, /*event_type_index=*/1);
160 counter.Increment(5);
161 ASSERT_EQ(counter.GetRemoteCount(), 5);
172 auto counter = collector.AddCounter(/*metric_id=*/1, /*event_type_index=*/1);
175 counter.Increment(5);
178 ASSERT_EQ(counter.GetRemoteCount(), 5);
228 auto counter = collector.AddCounter(/*metric_id=*/2, /*event_type_index=*/1);
233 counter.Increment(5);
241 EXPECT_EQ(counter.GetRemoteCount(), 0);
271 auto counter = collector.AddCounter(/*metric_id=*/2, /*event_type_index=*/1);
275 counter.Increment(5);
287 EXPECT_EQ(counter.GetRemoteCount(), 0);
340 for (auto& counter : args->counters) {
342 counter.Increment(curr);
445 // Each counter is increased by |index| for each thread recording observations.