Skip to content

Commit

Permalink
Export of internal Abseil changes
Browse files Browse the repository at this point in the history
--
9214ee309fa224a43eb1621bcf826ab9c86a4cd7 by Abseil Team <absl-team@google.com>:

Don't keep constructing/destructing `random_device`.

It causes an open/close pair on /dev/urandom.

This is somewhat expensive on Emscripten, and unnecessary since it is not using
the value anyway.

PiperOrigin-RevId: 332055452

--
4931ab77995b946f3ffba8036e0a00927b0d47e6 by Abseil Team <absl-team@google.com>:

TYPO: Stess->Stress

PiperOrigin-RevId: 332010526

--
95ae1dde505f74dc7fd68447bf27718db223688e by Gennadiy Rozental <rogeeff@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 332010411
GitOrigin-RevId: 9214ee309fa224a43eb1621bcf826ab9c86a4cd7
Change-Id: I23c5d6aa5aa488370e1b48f37366d3d99448e7ec
  • Loading branch information
Abseil Team authored and rogeeff committed Sep 17, 2020
1 parent c1ae0a4 commit 20feb1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions absl/container/internal/hash_generator_testing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ class RandomDeviceSeedSeq {
} // namespace

std::mt19937_64* GetSharedRng() {
RandomDeviceSeedSeq seed_seq;
static auto* rng = new std::mt19937_64(seed_seq);
static auto* rng = [] {
RandomDeviceSeedSeq seed_seq;
return new std::mt19937_64(seed_seq);
}();
return rng;
}

Expand Down
2 changes: 1 addition & 1 deletion absl/synchronization/mutex_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ TEST(Mutex, DeadlockDetectorBazelWarning) {
// annotation-based static thread-safety analysis is not currently
// predicate-aware and cannot tell if the two for-loops that acquire and
// release the locks have the same predicates.
TEST(Mutex, DeadlockDetectorStessTest) ABSL_NO_THREAD_SAFETY_ANALYSIS {
TEST(Mutex, DeadlockDetectorStressTest) ABSL_NO_THREAD_SAFETY_ANALYSIS {
// Stress test: Here we create a large number of locks and use all of them.
// If a deadlock detector keeps a full graph of lock acquisition order,
// it will likely be too slow for this test to pass.
Expand Down
5 changes: 5 additions & 0 deletions absl/time/internal/cctz/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ cc_library(

### tests

test_suite(
name = "all_tests",
visibility = ["//visibility:public"],
)

cc_test(
name = "civil_time_test",
size = "small",
Expand Down

0 comments on commit 20feb1c

Please sign in to comment.