CI tests run faster: save 120s in azure machines, 335s on local OSX

This commit is contained in:
Timothee Cour
2020-02-27 01:36:06 -08:00
committed by Andreas Rumpf
parent 9b8c9abead
commit fdc5925cbd

View File

@@ -14,8 +14,20 @@ proc makeObj(): TTestObj =
result.x = "Hello"
result.s = @[1,2,3]
const numIter =
when defined(boehmgc):
# super slow because GC_fullcollect() at each iteration; especially
# on OSX 10.15 where it takes ~170s
# `getOccupiedMem` should be constant after each iteration for i >= 3
1_000
elif defined(gcMarkAndSweep):
# likewise, somewhat slow, 1_000_000 would run for 8s
# and same remark as above
100_000
else: 1_000_000
proc inProc() =
for i in 1 .. 1_000_000:
for i in 1 .. numIter:
when defined(gcMarkAndSweep) or defined(boehmgc):
GC_fullcollect()
var obj: TTestObj