s/BenchmarkSuite.st
changeset 0 c86831d0f7e7
child 2 e48eb0a3f5a3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/s/BenchmarkSuite.st	Tue May 28 00:25:51 2013 +0100
@@ -0,0 +1,68 @@
+"{ Package: 'jv:calipel/s' }"
+
+Object subclass:#BenchmarkSuite
+	instanceVariableNames:'benchmarks'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'CalipeL/S-Core'
+!
+
+
+!BenchmarkSuite class methodsFor:'instance creation'!
+
+new
+    "return an initialized instance"
+
+    ^ self basicNew initialize.
+! !
+
+!BenchmarkSuite methodsFor:'initialization'!
+
+initialize
+    "Invoked when a new instance is created."
+
+    "/ please change as required (and remove this comment)
+    benchmarks := Set new.
+
+    "/ super initialize.   -- commented since inherited method does nothing
+
+    "Modified: / 27-05-2013 / 18:57:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BenchmarkSuite methodsFor:'running'!
+
+run
+    ^self run: BenchmarkResult new.
+
+    "Created: / 27-05-2013 / 19:10:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+run: aBenchmarkResult
+    ^self run: aBenchmarkResult with: Dictionary new
+
+    "Created: / 27-05-2013 / 19:10:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 28-05-2013 / 00:02:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+run: aBenchmarkResult with: aDictionary
+    benchmarks do:[:each|
+        each run: aBenchmarkResult with: aDictionary
+    ].
+    ^aBenchmarkResult
+
+    "Created: / 27-05-2013 / 22:18:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+runWith: aDictionary
+    ^self run: BenchmarkResult new with: aDictionary
+
+    "Created: / 27-05-2013 / 22:18:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BenchmarkSuite class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+