about summary refs log tree commit diff
path: root/absl/container/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-11-25T18·40-0800
committerGennadiy Rozental <rogeeff@google.com>2019-11-25T19·57-0500
commit7f4fe64af80fe3c84db8ea938276c3690573c45e (patch)
tree8a88ab00a8c2210edd1be109ec00a83586ad03c1 /absl/container/internal
parent16d9fd58a51c6083234e2e9f8f50e49ed5ed02e4 (diff)
Export of internal Abseil changes
--
44efc1bb0e0a47eabf0569eaab81c66710d5b9c3 by Mark Barolak <mbar@google.com>:

Update "strings::Substitute" to "absl::Substitute" in the absl::Substitute error messages.

PiperOrigin-RevId: 282388042

--
9ec7e9385f5469473f76857dc5b067d869bbc65b by Abseil Team <absl-team@google.com>:

Remove deprecated ExponentialBiased::Get()

PiperOrigin-RevId: 282045123
GitOrigin-RevId: 44efc1bb0e0a47eabf0569eaab81c66710d5b9c3
Change-Id: I915bf0ff5fa7ac2bd5f9fb653d1fbd9ece6af9fc
Diffstat (limited to 'absl/container/internal')
-rw-r--r--absl/container/internal/hashtablez_sampler.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/absl/container/internal/hashtablez_sampler.cc b/absl/container/internal/hashtablez_sampler.cc
index 4aec0a07ffb3..6deeca44d97b 100644
--- a/absl/container/internal/hashtablez_sampler.cc
+++ b/absl/container/internal/hashtablez_sampler.cc
@@ -196,12 +196,10 @@ HashtablezInfo* SampleSlow(int64_t* next_sample) {
   return nullptr;
 #else
   bool first = *next_sample < 0;
-  *next_sample = g_exponential_biased_generator.Get(
+  *next_sample = g_exponential_biased_generator.GetStride(
       g_hashtablez_sample_parameter.load(std::memory_order_relaxed));
   // Small values of interval are equivalent to just sampling next time.
-  if (*next_sample < 1) {
-    *next_sample = 1;
-  }
+  ABSL_ASSERT(*next_sample >= 1);
 
   // g_hashtablez_enabled can be dynamically flipped, we need to set a threshold
   // low enough that we will start sampling in a reasonable time, so we just use