10
10
#include " ../../test/gtest.h"
11
11
#include " ../../test/ci-tools.h"
12
12
13
- /*
14
13
TEST (Throttle, basic) {
15
14
// baseline
16
15
uint64_t total = 10UL * 1024 * 1024 ;
@@ -110,7 +109,6 @@ TEST(Throttle, pulse) {
110
109
EXPECT_GT ((uint64_t ) duration.count (), 9UL * 1000 * 1000 );
111
110
EXPECT_LT ((uint64_t ) duration.count (), 20UL * 1000 * 1000 );
112
111
}
113
- */
114
112
115
113
template <typename IDLE>
116
114
void test_with_idle (IDLE&& idle) {
@@ -134,7 +132,7 @@ void test_with_idle(IDLE&& idle) {
134
132
EXPECT_LT ((uint64_t ) duration.count (), 2UL * 1000 * 1000 );
135
133
}
136
134
137
- /* TEST(Throttle, no_sleep) {
135
+ TEST (Throttle, no_sleep) {
138
136
test_with_idle ([] {});
139
137
}
140
138
@@ -165,7 +163,7 @@ TEST(Throttle, try_consume) {
165
163
LOG_INFO (" Act ` times in 10 sec, prevent ` acts" , DEC (count).comma (true ),
166
164
DEC (failure).comma (true ));
167
165
EXPECT_LT (count, 11000UL );
168
- }*/
166
+ }
169
167
170
168
// //////////////////////////////////////
171
169
// The sleep and semaphore in macOS is less efficient and always cause variance, so skip macOS
@@ -220,15 +218,15 @@ TEST_P(FindAppropriateSliceNumTest, run) {
220
218
#define INSTANTIATE_TEST_P INSTANTIATE_TEST_CASE_P
221
219
#endif
222
220
223
- /* INSTANTIATE_TEST_P(Throttle,
221
+ INSTANTIATE_TEST_P (Throttle,
224
222
FindAppropriateSliceNumTest, testing::Values(
225
223
FindAppropriateSliceNumSuite{10 , 0.01 },
226
224
FindAppropriateSliceNumSuite{50 , 0.02 },
227
225
FindAppropriateSliceNumSuite{100 , 0.03 },
228
226
FindAppropriateSliceNumSuite{500 , 0.08 },
229
227
FindAppropriateSliceNumSuite{1000 , 0.08 },
230
228
FindAppropriateSliceNumSuite{5000 , 0.85 } // Unacceptable
231
- ));*/
229
+ ));
232
230
233
231
// //////////////////////////////////////
234
232
0 commit comments