We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f7982c + e2cf53a commit 4cc28b4Copy full SHA for 4cc28b4
1 file changed
src/Profile/Runner.idr
@@ -8,6 +8,10 @@ import Profile.Types
8
9
%default total
10
11
+%foreign "scheme,chez:(lambda () (collect (collect-maximum-generation)))"
12
+ "javascript:lambda:(w) => {}"
13
+prim__collect : PrimIO ()
14
+
15
unitFor : Integer -> String
16
unitFor 0 = "fs"
17
unitFor 1 = "ps"
@@ -57,10 +61,11 @@ runs = go 600 [< 1] 1 1.0
57
61
in go k (if p2.val > p.val then sx :< p2 else sx) p2 nx
58
62
59
63
-- runs a benchmark once with the given number of
60
--- interations
64
+-- iterations
65
run : Pos -> Benchmarkable err -> IO (Either err Measured)
66
run p (MkBenchmarkable alloc clean go cpuonly) = do
67
env <- alloc p
68
+ fromPrim prim__collect
69
start <- clockTime Monotonic
70
startCPU <- clockTime Process
71
res <- go env p
0 commit comments