Skip to content

Commit c1197b2

Browse files
committed
Pause before the end of the benchmark program so that the results can be read if it was started in a graphical environment
1 parent ce8faa8 commit c1197b2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bench.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,18 @@ print("Minimum Int:", math.mininteger or "Unknown")
151151
print("Maximum Int:", math.maxinteger or "Unknown")
152152
print()
153153
print("Benchmark", "Iterations", "Time (min:sec.ms)")
154-
-- Run the benchmarks
155154

155+
-- Run the benchmarks
156156
bm = os.clock()
157-
158157
benchmark_add()
159158
benchmark_flt()
160159
benchmark_sub()
161160
benchmark_mul()
162161
benchmark_div()
163-
164162
benchmark_pi()
165163
benchmark_gcd()
166-
167164
benchmark_array()
168165
print(string.rep('_', 49))
169166
io.write("Total:\t\t" .. string.format("%8.3fkB", collectgarbage("count")) .. "\t")
170167
BenchmarkEnd(bm)
168+
print("Press Enter to Exit...") io.read() os.exit()

0 commit comments

Comments
 (0)