[pypy-commit] lang-smalltalk default: new version of SPy-Benchmarks:

lwassermann noreply at buildbot.pypy.org
Mon Apr 29 19:19:40 CEST 2013


Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch: 
Changeset: r348:53e6327fd264
Date: 2013-04-29 18:09 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/53e6327fd264/

Log:	new version of SPy-Benchmarks: changes needed to be able to run with
	spy

diff --git a/SPy-Benchmarks.package/SPyRunner.class/class/format..st b/SPy-Benchmarks.package/SPyRunner.class/class/format..st
--- a/SPy-Benchmarks.package/SPyRunner.class/class/format..st
+++ b/SPy-Benchmarks.package/SPyRunner.class/class/format..st
@@ -3,12 +3,7 @@
 	"self run"
 	"runs all the benchmarks and creates a string of csv format with one column per benchmarks"
 	^ String streamContents: 
-		[ :aStream | | someSymbols |
-		someSymbols := result keys.
-		someSymbols 
-			do: [ :aSymbol | aStream << aSymbol]
-			separatedBy: [ aStream << ';' ].
-		aStream << String lf.
-		someSymbols 
-			do: [ :aSymbol | aStream << (result at: aSymbol)]
-			separatedBy: [aStream << ';']]
\ No newline at end of file
+		[ :aStream |
+		result keysAndValuesDo: 
+			[ :key :value | 
+			aStream << key << ';' << value << String lf]]
\ No newline at end of file
diff --git a/SPy-Benchmarks.package/SPyRunner.class/class/run.st b/SPy-Benchmarks.package/SPyRunner.class/class/run.st
--- a/SPy-Benchmarks.package/SPyRunner.class/class/run.st
+++ b/SPy-Benchmarks.package/SPyRunner.class/class/run.st
@@ -1,9 +1,11 @@
 benchmarks
 run
 	"self run"
-	| result printString |
+	| result result2 |
 	result := self runShootout.
-	printString := self format: result.
-	(Smalltalk vmParameterAt: 3) = 0
-		ifTrue: [^printString] "SPy VM does not support stdout, yet"
-		ifFalse: [FileStream stdout nextPutAll: printString]
\ No newline at end of file
+	result2 := self runTinyBenchmarks.
+	result at: #benchmark put: (result2 at: #benchmark). 
+	result at: #benchFib put: (result2 at: #benchFib). 
+	
+	^self format: result.
+	
\ No newline at end of file
diff --git a/SPy-Benchmarks.package/SPyRunner.class/class/runShootout.st b/SPy-Benchmarks.package/SPyRunner.class/class/runShootout.st
--- a/SPy-Benchmarks.package/SPyRunner.class/class/runShootout.st
+++ b/SPy-Benchmarks.package/SPyRunner.class/class/runShootout.st
@@ -6,8 +6,8 @@
 	times := Dictionary new.
 	{ [ShootoutTests nbody: 200000 "20000000" to: stream].
 	   [ShootoutTests binarytrees: 17 to: stream].
-	   [ShootoutTests chameneosredux: 2600000 to: stream].
-	   [ShootoutTests threadring: 100000000 to: stream] } do:	
+	   "[ShootoutTests chameneosredux: 2600000 to: stream].
+	   [ShootoutTests threadring: 100000000 to: stream]" } do:	
 		[:block | | benchmark t |
 		benchmark := (ShootoutTests selectorForSimpleBlock: block) copyUpTo: $:.
 		"Smalltalk garbageCollect."
diff --git a/SPy-Benchmarks.package/SPyRunner.class/methodProperties.json b/SPy-Benchmarks.package/SPyRunner.class/methodProperties.json
--- a/SPy-Benchmarks.package/SPyRunner.class/methodProperties.json
+++ b/SPy-Benchmarks.package/SPyRunner.class/methodProperties.json
@@ -1,7 +1,8 @@
 {
 	"class" : {
-		"format:" : "lw 4/29/2013 13:34",
-		"run" : "lw 4/29/2013 13:37",
-		"runShootout" : "lw 4/29/2013 13:17" },
+		"format:" : "lw 4/29/2013 17:13",
+		"run" : "lw 4/29/2013 17:51",
+		"runShootout" : "lw 4/29/2013 18:05",
+		"runTinyBenchmarks" : "lw 4/29/2013 17:39" },
 	"instance" : {
 		 } }
diff --git a/SPy-Benchmarks.package/monticello.meta/version b/SPy-Benchmarks.package/monticello.meta/version
--- a/SPy-Benchmarks.package/monticello.meta/version
+++ b/SPy-Benchmarks.package/monticello.meta/version
@@ -1,1 +1,1 @@
-(name 'SPy-Benchmarks-lw.2' message 'second try for an initial commit with shootout tests' id 'e538d5dc-ff13-4753-a166-bb95af0c7e0b' date '29 April 2013' time '1:41:50.098 pm' author 'lw' ancestors ((name 'SPy-Benchmarks-lw.1' message 'initial commit with existing Shootout tests' id '67ba6a6a-5476-4dc0-892f-de76933491e8' date '29 April 2013' time '1:40:20.34 pm' author 'lw' ancestors () stepChildren ())) stepChildren ())
\ No newline at end of file
+(name 'SPy-Benchmarks-lw.4' message 'changed the test running and collecting to work with the current spy vm
removed two of the shootout tests due to failure on spy' id '9d1c1e0a-0209-45d3-8e0a-220919ab5701' date '29 April 2013' time '6:07:26.686 pm' author 'lw' ancestors ((name 'SPy-Benchmarks-lw.3' message 'added tiny benchmarks' id 'c8214449-4009-4a64-8284-3c58395fe2bc' date '29 April 2013' time '2:15:43.242 pm' author 'lw' ancestors ((name 'SPy-Benchmarks-lw.2' message 'second try for an initial commit with shootout tests' id 'e538d5dc-ff13-4753-a166-bb95af0c7e0b' date '29 April 2013' time '1:41:50.098 pm' author 'lw' ancestors ((name 'SPy-Benchmarks-lw.1' message 'initial commit with existing Shootout tests' id '67ba6a6a-5476-4dc0-892f-de76933491e8' date '29 April 2013' time '1:40:20.34 pm' author 'lw' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
\ No newline at end of file


More information about the pypy-commit mailing list