@@ -25,6 +25,13 @@ if _ENV then
2525 unpack = table.unpack
2626end
2727
28+ if # arg > 0 then
29+ if arg [1 ] == " 1" then
30+ useTimeForClock = true
31+ end
32+ end
33+ print (" useTimeForClock=" , useTimeForClock )
34+
2835function writeResult (writer , benchResult )
2936 writer :writeTitle (" %-30s" , benchResult .benchmarkName )
3037 writer :writeValue (" %15d ms" , benchResult .elapsed )
@@ -40,18 +47,18 @@ local writer = Writer("Output.log")
4047BenchmarkBase .IterrationsRatio = 0.1
4148
4249benchmarks = {
43- -- ArithemticsBenchmark(writer, true),
44- -- MathBenchmark(writer, true),
45- -- CallBenchmark(writer, true),
46- -- IfElseBenchmark(writer, true),
47- -- StringManipulation(writer, true),
48- -- MemoryBenchmark(writer, true),
49- -- RandomMemoryBenchmark(writer, true),
50- -- Scimark2Benchmark(writer, true),
50+ ArithemticsBenchmark (writer , true ),
51+ MathBenchmark (writer , true ),
52+ CallBenchmark (writer , true ),
53+ IfElseBenchmark (writer , true ),
54+ StringManipulation (writer , true ),
55+ MemoryBenchmark (writer , true ),
56+ RandomMemoryBenchmark (writer , true ),
57+ Scimark2Benchmark (writer , true ),
5158 DhrystoneBenchmark (writer , true ),
52- -- WhetstoneBenchmark(writer, true),
53- -- LinpackBenchmark(writer, true),
54- -- HashBenchmark(writer, true)
59+ WhetstoneBenchmark (writer , true ),
60+ LinpackBenchmark (writer , true ),
61+ HashBenchmark (writer , true )
5562}
5663
5764writer :writeHeader (" Warmup" )
@@ -89,6 +96,7 @@ writer:writeLine()
8996
9097local os , arch = getOS ()
9198local osVersion = os .. ' ' .. arch
99+ local runtime = getVersion ()
92100
93101local headerCommon = " Operating System,Runtime,Threads Count,Memory Used"
94102local headerTotals = " ,Total Points,Total Time (ms)"
@@ -101,7 +109,7 @@ for i,benchmark in ipairs(benchmarks) do
101109end
102110writer :writeTitle (headerTotals )
103111writer :writeLine ()
104- writer :writeTitle (" %s,%s,%d,%d" , osVersion , _VERSION , 1 , 0 )
112+ writer :writeTitle (" %s,%s,%d,%d" , osVersion , runtime , 1 , 0 )
105113for i ,point in ipairs (points ) do
106114 writer :writeTitle (" ,%.2f" , point )
107115end
@@ -116,7 +124,7 @@ for i,benchmark in ipairs(benchmarks) do
116124end
117125writer :writeTitle (headerTotals )
118126writer :writeLine ()
119- writer :writeTitle (" %s,%s,%d,%d" , osVersion , _VERSION , 1 , 0 )
127+ writer :writeTitle (" %s,%s,%d,%d" , osVersion , runtime , 1 , 0 )
120128for i ,result in ipairs (results ) do
121129 writer :writeTitle (" ,%.2f" , result )
122130end
0 commit comments