CI tests run faster: save 120s in azure machines, 335s on local OSX
This commit is contained in:
parent
9b8c9abead
commit
fdc5925cbd
1 changed files with 13 additions and 1 deletions
|
|
@ -14,8 +14,20 @@ proc makeObj(): TTestObj =
|
||||||
result.x = "Hello"
|
result.x = "Hello"
|
||||||
result.s = @[1,2,3]
|
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() =
|
proc inProc() =
|
||||||
for i in 1 .. 1_000_000:
|
for i in 1 .. numIter:
|
||||||
when defined(gcMarkAndSweep) or defined(boehmgc):
|
when defined(gcMarkAndSweep) or defined(boehmgc):
|
||||||
GC_fullcollect()
|
GC_fullcollect()
|
||||||
var obj: TTestObj
|
var obj: TTestObj
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue