Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2c7b4292432b
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 80be4b3fdf0c
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on May 5, 2019

  1. Speed up debug tests.

    pleroy committed May 5, 2019
    Copy the full SHA
    b043505 View commit details
  2. Merge pull request #2152 from pleroy/BaseTests

    Speed up debug tests
    pleroy authored May 5, 2019
    Copy the full SHA
    80be4b3 View commit details
Showing with 15 additions and 3 deletions.
  1. +4 −0 base/bundle_test.cpp
  2. +5 −1 base/push_deserializer_test.cpp
  3. +5 −1 base/thread_pool_test.cpp
  4. +1 −1 numerics/fast_sin_cos_2π_test.cpp
4 changes: 4 additions & 0 deletions base/bundle_test.cpp
Original file line number Diff line number Diff line change
@@ -43,7 +43,11 @@ TEST_F(BundleDeathTest, AddAfterJoin) {
}

TEST_F(BundleTest, MatrixVectorProduct) {
#if defined(_DEBUG)
constexpr std::int64_t short_dimension = 100;
#else
constexpr std::int64_t short_dimension = 1000;
#endif
constexpr std::int64_t long_dimension = 100000;
std::vector<std::int64_t> matrix(short_dimension * long_dimension, 1);
std::vector<std::int64_t> vector(long_dimension);
6 changes: 5 additions & 1 deletion base/push_deserializer_test.cpp
Original file line number Diff line number Diff line change
@@ -36,7 +36,11 @@ using ::testing::ElementsAreArray;

namespace {
int const deserializer_chunk_size = 99;
int const runs_per_test = 1000;
#if defined(_DEBUG)
constexpr int runs_per_test = 100;
#else
constexpr int runs_per_test = 1000;
#endif
int const serializer_chunk_size = 99;
int const number_of_chunks = 3;
const char start[] = "START";
6 changes: 5 additions & 1 deletion base/thread_pool_test.cpp
Original file line number Diff line number Diff line change
@@ -22,7 +22,11 @@ class ThreadPoolTest : public ::testing::Test {
// Check that execution occurs in parallel. If things were sequential, the
// integers in |numbers| would be monotonically increasing.
TEST_F(ThreadPoolTest, ParallelExecution) {
static constexpr int number_of_calls = 1'000'000;
#if defined(_DEBUG)
constexpr int number_of_calls = 100'000;
#else
constexpr int number_of_calls = 1'000'000;
#endif

absl::Mutex lock;
std::vector<std::int64_t> numbers;
2 changes: 1 addition & 1 deletion numerics/fast_sin_cos_2π_test.cpp
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ namespace numerics {
class FastSinCos2πTest : public ::testing::Test {
protected:
#if defined(_DEBUG)
static constexpr int iterations_ = 1e7;
static constexpr int iterations_ = 1e6;
#else
static constexpr int iterations_ = 1e8;
#endif