Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Jan 4, 2025
1 parent 96b5e73 commit 571ff23
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions common/test/test_throttle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "../../test/gtest.h"
#include "../../test/ci-tools.h"

/*
TEST(Throttle, basic) {
// baseline
uint64_t total = 10UL * 1024 * 1024;
Expand Down Expand Up @@ -110,7 +109,6 @@ TEST(Throttle, pulse) {
EXPECT_GT((uint64_t) duration.count(), 9UL * 1000 * 1000);
EXPECT_LT((uint64_t) duration.count(), 20UL * 1000 * 1000);
}
*/

template <typename IDLE>
void test_with_idle(IDLE&& idle) {
Expand All @@ -134,7 +132,7 @@ void test_with_idle(IDLE&& idle) {
EXPECT_LT((uint64_t) duration.count(), 2UL * 1000 * 1000);
}

/*TEST(Throttle, no_sleep) {
TEST(Throttle, no_sleep) {
test_with_idle([] {});
}

Expand Down Expand Up @@ -165,7 +163,7 @@ TEST(Throttle, try_consume) {
LOG_INFO("Act ` times in 10 sec, prevent ` acts", DEC(count).comma(true),
DEC(failure).comma(true));
EXPECT_LT(count, 11000UL);
}*/
}

////////////////////////////////////////
// The sleep and semaphore in macOS is less efficient and always cause variance, so skip macOS
Expand Down Expand Up @@ -220,15 +218,15 @@ TEST_P(FindAppropriateSliceNumTest, run) {
#define INSTANTIATE_TEST_P INSTANTIATE_TEST_CASE_P
#endif

/*INSTANTIATE_TEST_P(Throttle,
INSTANTIATE_TEST_P(Throttle,
FindAppropriateSliceNumTest, testing::Values(
FindAppropriateSliceNumSuite{10, 0.01},
FindAppropriateSliceNumSuite{50, 0.02},
FindAppropriateSliceNumSuite{100, 0.03},
FindAppropriateSliceNumSuite{500, 0.08},
FindAppropriateSliceNumSuite{1000, 0.08},
FindAppropriateSliceNumSuite{5000, 0.85} // Unacceptable
));*/
));

////////////////////////////////////////

Expand Down

0 comments on commit 571ff23

Please sign in to comment.