Skip to content

Commit fd82051

Browse files
committed
adjust dispatch_timer_short to control testing time
Reduce N (number of suspended timers) from 100000 to 25000 to make it suitable for running in CI environment. Test case execution time on Linux appears to be roughly quadratic in N. Setting N to 25000 yields a test that runs in about 30 seconds; at 100000 the test takes around 15 minutes to run. Profiling says that 99% of test execution is spent in _dispatch_timers_update.
1 parent a8d0327 commit fd82051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/dispatch_timer_short.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define delay (1ull * NSEC_PER_SEC)
3737
#define interval (5ull * NSEC_PER_USEC)
3838

39-
#define N 100000
39+
#define N 25000
4040

4141
static dispatch_source_t t[N];
4242
static dispatch_queue_t q;

0 commit comments

Comments
 (0)