Added lost method PPCBenchmark>>teardownSmalltalkGrammarTokenized
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 11 May 2015 18:31:26 +0100
changeset 458 a4da1c24d84a
parent 457 76de2febe7d2
child 460 87a3d30ab570
Added lost method PPCBenchmark>>teardownSmalltalkGrammarTokenized
compiler/benchmarks/PPCBenchmark.st
--- a/compiler/benchmarks/PPCBenchmark.st	Mon May 11 18:29:13 2015 +0100
+++ b/compiler/benchmarks/PPCBenchmark.st	Mon May 11 18:31:26 2015 +0100
@@ -47,6 +47,12 @@
     "
     PPCBenchmark run: #benchmarkRBParserC
     "
+!
+
+spy: benchmark
+    ^ (BenchmarkInstance class:self selector:benchmark) spy
+
+    "Created: / 11-05-2015 / 16:31:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !PPCBenchmark methodsFor:'benchmark support'!
@@ -446,6 +452,17 @@
 "
 !
 
+teardownSmalltalkGrammarTokenized
+    parser class removeFromSystem.
+"       
+    size := input inject: 0 into: [:r :e | r + e size  ].
+    Transcript crShow: 'Compiled Grammar time: ', time asString.
+    Transcript crShow: 'Time per character: ', (time / size * 1000.0) asString, ' microseconds'.
+"
+
+    "Created: / 11-05-2015 / 16:33:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 teardownSmalltalkParserCompiled
     parser class removeFromSystem.
 "