about summary refs log tree commit diff
path: root/absl/base/internal/periodic_sampler_benchmark.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-11-21T18·30-0800
committerGennadiy Civil <misterg@google.com>2019-11-22T16·35-0500
commit16d9fd58a51c6083234e2e9f8f50e49ed5ed02e4 (patch)
treec4d5da856d0ee16401bb6d9694c998e51b2f604c /absl/base/internal/periodic_sampler_benchmark.cc
parentbcaae6009c0833b73c6fa7bdd972921d8081a724 (diff)
Export of internal Abseil changes
--
db8dbd0e8a7b0125a4819dfc81c9bd2496849c71 by Abseil Team <absl-team@google.com>:

Create GetSkipCount() and GetStride() methods and add rounding bias correction.

PiperOrigin-RevId: 281780897
GitOrigin-RevId: db8dbd0e8a7b0125a4819dfc81c9bd2496849c71
Change-Id: I56a97288b1cb38a9357c065747f8d9bc4b187fee
Diffstat (limited to 'absl/base/internal/periodic_sampler_benchmark.cc')
-rw-r--r--absl/base/internal/periodic_sampler_benchmark.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/absl/base/internal/periodic_sampler_benchmark.cc b/absl/base/internal/periodic_sampler_benchmark.cc
index f87cef73dc16..037596321776 100644
--- a/absl/base/internal/periodic_sampler_benchmark.cc
+++ b/absl/base/internal/periodic_sampler_benchmark.cc
@@ -37,6 +37,13 @@ void BM_SampleMinunumInlined(Sampler* sampler, benchmark::State& state) {
   }
 }
 
+void BM_PeriodicSampler_TinySample(benchmark::State& state) {
+  struct Tag {};
+  PeriodicSampler<Tag, 10> sampler;
+  BM_Sample(&sampler, state);
+}
+BENCHMARK(BM_PeriodicSampler_TinySample);
+
 void BM_PeriodicSampler_ShortSample(benchmark::State& state) {
   struct Tag {};
   PeriodicSampler<Tag, 1024> sampler;