s/BenchmarkRunner.st
changeset 190 ab1b88f52b93
parent 185 68ba8ec6c406
child 204 97b7cdaeb0e8
--- a/s/BenchmarkRunner.st	Thu Sep 19 22:12:36 2013 +0100
+++ b/s/BenchmarkRunner.st	Thu Sep 19 23:32:35 2013 +0100
@@ -38,7 +38,7 @@
 !BenchmarkRunner methodsFor:'main'!
 
 main:argv0
-    | i report name file params classes runs argv |
+    | i report name file params classes runs argv desc |
 
     params := Dictionary new.
     classes := OrderedCollection new.
@@ -117,6 +117,14 @@
                 i := i + 1.
             ].
 
+            arg = '--description' ifTrue:[
+                i > argv size ifTrue:[
+                    self error:'--description requires a string parameter.'
+                ].                
+                desc := argv at: i.
+                i := i + 1.
+            ].    
+
             arg second = $D ifTrue:[
                 | eqIdx |
 
@@ -171,15 +179,17 @@
         file asFilename writingFileDo:[:s|
             report
                 name: name;
+                description: desc;      
                 write: result on: s 
         ]
     ] ifFalse:[
         report
             name: name;
+            description: desc;
             write: result on: BenchmarkPlatform current stdout
     ].
 
-    "Modified: / 20-08-2013 / 20:47:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 19-09-2013 / 22:44:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 options
@@ -194,7 +204,8 @@
   --arguments FILE ....... read additional arguments from FOLE, one argument per line.
   --text ................. generate text report (equivalent to -r BenchmarkReportText)
   --json ................. generate JSON report (equivalent to -r BenchmarkReportJSON)
-  --tag TAG .............. tag for the current benchmark set (default: "unnamed")
+  --tag TAG .............. tag for the current benchmark set (default: "default")
+  --description .......... short string describing the current configuration (default: nothing)
   -DNAME=VALUE ........... defines a parameter NAME with value of VALUE
 
 Suitespec format:
@@ -206,7 +217,7 @@
 '
 
     "Created: / 06-06-2013 / 11:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 20-08-2013 / 20:47:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 19-09-2013 / 23:29:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !BenchmarkRunner class methodsFor:'documentation'!