--- a/.hgignore Mon Mar 21 13:15:35 2016 +0100
+++ b/.hgignore Mon Mar 21 23:47:50 2016 +0100
@@ -42,6 +42,7 @@
web/public/assets/*
web/public/uploads/*
web/public/archive/*
+web/vendor/bundle/ruby/*
# Java implementation temporary files
java/target
@@ -62,3 +63,13 @@
mc
package-cache
*.mcz
+
+# Bee generated files
+s/bee/jv_calipel_s.*
+s/bee/jv_calipel_s_tests.*
+s/bee/jv_calipel_s_benchmarks_game.*
+s/bee/jv_calipel_s_benchmarks_micro.*
+s/bee/*.bsc
+s/bee/*.bsl
+s/bee/*.ch
+s/bee/st.chg
--- a/s/Benchmark.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/Benchmark.st Mon Mar 21 23:47:50 2016 +0100
@@ -34,22 +34,44 @@
!Benchmark class methodsFor:'running'!
run
+ "Run all benchmarks in this class. Returns benchmark results as instance of BenchmarkResultC"
+
^ (BenchmarkSuite class:self) run
"Created: / 10-06-2013 / 21:53:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:05:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
run: benchmark
+ "Run benchmarks defined in method `benchmark` Returns benchmark result as instance of BenchmarkResultC"
+
^ (BenchmarkInstance class:self selector:benchmark) run
"Created: / 31-05-2013 / 10:39:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 10-06-2013 / 21:53:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:05:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
run: benchmark with: parameters
+ "Run benchmark defined in method `benchmark` with given parameters.
+ Returns benchmark results as instance of BenchmarkResultC.
+ `parameters` id a Dictionary defining parameters and theit values
+ (as strings).
+ "
+
^ (BenchmarkInstance class:self selector:benchmark) runWith: parameters
"Created: / 10-03-2014 / 00:12:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:07:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+spy: benchmark
+ "Rum the benchmark under a Smalltalk profiler (MessageTally or whatever
+ the platform provides)."
+
+ ^ (BenchmarkInstance class:self selector:benchmark) spy
+
+ "Created: / 30-10-2015 / 07:16:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Benchmark class methodsFor:'testing'!
--- a/s/BenchmarkResultC.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/BenchmarkResultC.st Mon Mar 21 23:47:50 2016 +0100
@@ -9,6 +9,33 @@
category:'CalipeL-S-Core'
!
+!BenchmarkResultC class methodsFor:'documentation'!
+
+documentation
+"
+ Instances of BenchmarkResultC hold results of benchmarks run, i.e., times, number of GCs
+ and other values collected by instruments.
+
+ For each benchmark, results are held in BenchmarkOutcome.
+
+ Note: The name of this class is rather stupid, but this is because of Pharo.
+ In Pharo 5.0 they introduced a class named BenchmarkResult, which is, indeed,
+ a completely different beast. To solve this name clash, 'C' has been appended
+ to denote this is 'Calipel''s version of BenchmarkResult.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+ BenchmarkOutcome
+ BenchmarkExecutor
+
+"
+! !
!BenchmarkResultC class methodsFor:'instance creation'!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/s/bee/Makefile Mon Mar 21 23:47:50 2016 +0100
@@ -0,0 +1,25 @@
+BEE_FILES= \
+ jv_calipel_s.prj \
+ jv_calipel_s.stp \
+ jv_calipel_s_tests.prj \
+ jv_calipel_s_tests.stp \
+ jv_calipel_s_benchmarks_game.prj \
+ jv_calipel_s_benchmarks_game.stp \
+ jv_calipel_s_benchmarks_micro.prj \
+ jv_calipel_s_benchmarks_micro.stp
+
+default: $(BEE_FILES)
+
+
+$(BEE_FILES):
+ ../../../../stx/projects/smalltalk/smalltalk --eval " \
+ Smalltalk packagePath add:'../../../..' . \
+ Smalltalk loadPackage:'jv:calipel/s'. \
+ (Smalltalk at: #'jv_calipel_s') beeExportTo: '.'. "
+
+clobber: clean
+ rm -f *.bsc *.bsl
+
+clean:
+ rm -f $(BEE_FILES) st.chg
+
--- a/s/benchmarks/stx/BenchmarkCollection.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkCollection.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Benchmark subclass:#BenchmarkCollection
instanceVariableNames:'collectionClass collectionDatasetSize collectionDataset1
collectionDataset2 collectionDataset3 collection
--- a/s/benchmarks/stx/BenchmarkDictionaryLike.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkDictionaryLike.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
BenchmarkCollection subclass:#BenchmarkDictionaryLike
instanceVariableNames:''
classVariableNames:''
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/s/benchmarks/stx/BenchmarkFiles.st Mon Mar 21 23:47:50 2016 +0100
@@ -0,0 +1,115 @@
+"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+
+"{ NameSpace: Smalltalk }"
+
+Object subclass:#BenchmarkFiles
+ instanceVariableNames:'tmpdir1 filenames1'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'CalipeL-S-Benchmarks-St/X'
+!
+
+
+!BenchmarkFiles class methodsFor:'running'!
+
+run
+ "Run all benchmarks in this class. Returns benchmark results as instance of BenchmarkResultC"
+
+ ^ (BenchmarkSuite class:self) run
+
+ "Created: / 10-06-2013 / 21:53:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:05:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+run: benchmark
+ "Run benchmarks defined in method `benchmark` Returns benchmark result as instance of BenchmarkResultC"
+
+ ^ (BenchmarkInstance class:self selector:benchmark) run
+
+ "Created: / 31-05-2013 / 10:39:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 10-06-2013 / 21:53:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:05:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+run: benchmark with: parameters
+ "Run benchmark defined in method `benchmark` with given parameters.
+ Returns benchmark results as instance of BenchmarkResultC.
+ `parameters` id a Dictionary defining parameters and theit values
+ (as strings).
+ "
+
+ ^ (BenchmarkInstance class:self selector:benchmark) runWith: parameters
+
+ "Created: / 10-03-2014 / 00:12:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 30-10-2015 / 07:07:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+spy: benchmark
+ "Rum the benchmark under a Smalltalk profiler (MessageTally or whatever
+ the platform provides)."
+
+ ^ (BenchmarkInstance class:self selector:benchmark) spy
+
+ "Created: / 30-10-2015 / 07:16:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BenchmarkFiles methodsFor:'benchmarks'!
+
+benchmarkExistsOpenReadClose
+ <benchmark: 'File: exists, open, read, close'>
+ <setup: #setupFilenames1>
+ 1000 timesRepeat:[
+ filenames1 do:[:fn |
+ | readstream |
+
+ fn exists.
+ readstream := fn readStream.
+ readstream contents.
+ readstream close.
+ ].
+ ].
+
+ "
+ BenchmarkFiles run: #benchmarkExistsOpenReadClose
+ "
+
+ "Created: / 30-10-2015 / 08:00:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BenchmarkFiles methodsFor:'setup'!
+
+setupFilenames1
+ | pkgdef pkgdir |
+
+ tmpdir1 := Filename newTemporaryDirectory.
+ pkgdef := Smalltalk at: #'jv_calipel_s'.
+ pkgdir := pkgdef packageDirectory.
+ filenames1 := pkgdef classNames collect:[ :each |
+ | basename |
+
+ basename := each , '.st'.
+ (pkgdir / basename) copyTo: (tmpdir1 / basename).
+ tmpdir1 / basename
+ ].
+
+ "Created: / 30-10-2015 / 07:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 30-10-2015 / 11:48:46 / jv"
+!
+
+teardown
+ <teardown>
+
+ (tmpdir1 notNil and:[ tmpdir1 isDirectory ]) ifTrue:[
+ tmpdir1 recursiveRemove.
+ ].
+
+ "Created: / 30-10-2015 / 11:49:43 / jv"
+! !
+
+!BenchmarkFiles class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/s/benchmarks/stx/BenchmarkLinkedList.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkLinkedList.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#BenchmarkLinkedList
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSTX1.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSTX1.st Mon Mar 21 23:47:50 2016 +0100
@@ -26,6 +26,8 @@
"
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Benchmark subclass:#BenchmarkSTX1
instanceVariableNames:'iterations'
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSTX2.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSTX2.st Mon Mar 21 23:47:50 2016 +0100
@@ -25,6 +25,8 @@
"
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Benchmark subclass:#BenchmarkSTX2
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSTX3.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSTX3.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Benchmark subclass:#BenchmarkSTX3
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSimpleHanoi.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSimpleHanoi.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Benchmark subclass:#BenchmarkSimpleHanoi
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSlopstone.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSlopstone.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#BenchmarkSlopstone
instanceVariableNames:'testParams testBlocks'
classVariableNames:''
@@ -499,3 +501,10 @@
[v := 0] value. [self] value. [v := 0] value. [v := 0] value. [v := 0] value. [v := 0] value. [v := 0] value]
! !
+!BenchmarkSlopstone class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/s/benchmarks/stx/BenchmarkSmopstone.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSmopstone.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#BenchmarkSmopstone
instanceVariableNames:'testParams testBlocks'
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSortedCollectionLike.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSortedCollectionLike.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
BenchmarkCollection subclass:#BenchmarkSortedCollectionLike
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/BenchmarkSpeedTester.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/BenchmarkSpeedTester.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#BenchmarkSpeedTester
instanceVariableNames:''
classVariableNames:''
--- a/s/benchmarks/stx/Make.proto Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/Make.proto Mon Mar 21 23:47:50 2016 +0100
@@ -107,7 +107,7 @@
# build all packages containing referenced classes for this package
-# they are nor needed to compile the package
+# they are not needed to compile the package (but later, to load it)
references:
@@ -123,6 +123,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)BenchmarkCollection.$(O) BenchmarkCollection.$(H): BenchmarkCollection.st $(INCLUDE_TOP)/jv/calipel/s/Benchmark.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)BenchmarkFiles.$(O) BenchmarkFiles.$(H): BenchmarkFiles.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkLinkedList.$(O) BenchmarkLinkedList.$(H): BenchmarkLinkedList.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkSTX1.$(O) BenchmarkSTX1.$(H): BenchmarkSTX1.st $(INCLUDE_TOP)/jv/calipel/s/Benchmark.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkSTX2.$(O) BenchmarkSTX2.$(H): BenchmarkSTX2.st $(INCLUDE_TOP)/jv/calipel/s/Benchmark.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/s/benchmarks/stx/Make.spec Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/Make.spec Mon Mar 21 23:47:50 2016 +0100
@@ -52,6 +52,7 @@
COMMON_CLASSES= \
BenchmarkCollection \
+ BenchmarkFiles \
BenchmarkLinkedList \
BenchmarkSTX1 \
BenchmarkSTX2 \
@@ -69,6 +70,7 @@
COMMON_OBJS= \
$(OUTDIR_SLASH)BenchmarkCollection.$(O) \
+ $(OUTDIR_SLASH)BenchmarkFiles.$(O) \
$(OUTDIR_SLASH)BenchmarkLinkedList.$(O) \
$(OUTDIR_SLASH)BenchmarkSTX1.$(O) \
$(OUTDIR_SLASH)BenchmarkSTX2.$(O) \
--- a/s/benchmarks/stx/abbrev.stc Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/abbrev.stc Mon Mar 21 23:47:50 2016 +0100
@@ -2,6 +2,7 @@
# this file is needed for stc to be able to compile modules independently.
# it provides information about a classes filename, category and especially namespace.
BenchmarkCollection BenchmarkCollection jv:calipel/s/benchmarks/stx 'CalipeL-S-Benchmarks-St/X' 0
+BenchmarkFiles BenchmarkFiles jv:calipel/s/benchmarks/stx 'CalipeL-S-Benchmarks-St/X' 0
BenchmarkLinkedList BenchmarkLinkedList jv:calipel/s/benchmarks/stx 'CalipeL-S-Benchmarks-St/X' 0
BenchmarkSTX1 BenchmarkSTX1 jv:calipel/s/benchmarks/stx 'CalipeL-S-Benchmarks-St/X' 0
BenchmarkSTX2 BenchmarkSTX2 jv:calipel/s/benchmarks/stx 'CalipeL-S-Benchmarks-St/X' 0
--- a/s/benchmarks/stx/bc.mak Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/bc.mak Mon Mar 21 23:47:50 2016 +0100
@@ -70,6 +70,7 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)BenchmarkCollection.$(O) BenchmarkCollection.$(H): BenchmarkCollection.st $(INCLUDE_TOP)\jv\calipel\s\Benchmark.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)BenchmarkFiles.$(O) BenchmarkFiles.$(H): BenchmarkFiles.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkLinkedList.$(O) BenchmarkLinkedList.$(H): BenchmarkLinkedList.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkSTX1.$(O) BenchmarkSTX1.$(H): BenchmarkSTX1.st $(INCLUDE_TOP)\jv\calipel\s\Benchmark.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)BenchmarkSTX2.$(O) BenchmarkSTX2.$(H): BenchmarkSTX2.st $(INCLUDE_TOP)\jv\calipel\s\Benchmark.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/s/benchmarks/stx/bmake.bat Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/bmake.bat Mon Mar 21 23:47:50 2016 +0100
@@ -7,6 +7,7 @@
@REM Kludge got Mercurial, cannot be implemented in Borland make
@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
make.exe -N -f bc.mak %DEFINES% %*
--- a/s/benchmarks/stx/jv_calipel_s_benchmarks_stx.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/jv_calipel_s_benchmarks_stx.st Mon Mar 21 23:47:50 2016 +0100
@@ -1,5 +1,7 @@
"{ Package: 'jv:calipel/s/benchmarks/stx' }"
+"{ NameSpace: Smalltalk }"
+
LibraryDefinition subclass:#jv_calipel_s_benchmarks_stx
instanceVariableNames:''
classVariableNames:''
@@ -23,26 +25,29 @@
"list packages which are mandatory as a prerequisite.
This are packages containing superclasses of my classes and classes which
are extended by myself.
- They are mandatory, beacuse we need these packages as a prerequisite for loading and compiling.
+ They are mandatory, because we need these packages as a prerequisite for loading and compiling.
This method is generated automatically,
by searching along the inheritance chain of all of my classes."
^ #(
- #'jv:calipel/s' "Benchmark - superclass of BenchmarkCollection "
- #'stx:libbasic' "LibraryDefinition - superclass of jv_calipel_s_benchmarks_stx "
+ #'jv:calipel/s' "Benchmark - superclass of BenchmarkCollection"
+ #'stx:libbasic' "LibraryDefinition - superclass of jv_calipel_s_benchmarks_stx"
)
!
referencedPreRequisites
"list packages which are a prerequisite, because they contain
classes which are referenced by my classes.
- We do not need these packages as a prerequisite for loading or compiling.
+ We do not need these packages as a prerequisite for compiling or loading,
+ however, a class from it may be referenced during execution and having it
+ unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+ includes explicit checks for the package being present.
This method is generated automatically,
by searching all classes (and their packages) which are referenced by my classes."
^ #(
- #'stx:libbasic2' "BinaryTree - referenced by BenchmarkSortedCollectionLike class>>test_Btree "
- #'stx:libview' "Color - referenced by BenchmarkSTX1>>lineDrawing2 "
+ #'stx:libbasic2' "BinaryTree - referenced by BenchmarkSortedCollectionLike class>>test_Btree"
+ #'stx:libview' "Color - referenced by BenchmarkSTX1>>lineDrawing2"
)
!
@@ -67,6 +72,7 @@
^ #(
"<className> or (<className> attributes...) in load order"
BenchmarkCollection
+ BenchmarkFiles
BenchmarkLinkedList
BenchmarkSTX1
BenchmarkSTX2
--- a/s/benchmarks/stx/libInit.cc Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/libInit.cc Mon Mar 21 23:47:50 2016 +0100
@@ -28,6 +28,7 @@
OBJ snd; struct __vmData__ *__pRT__; {
__BEGIN_PACKAGE2__("libjv_calipel_s_benchmarks_stx", _libjv_calipel_s_benchmarks_stx_Init, "jv:calipel/s/benchmarks/stx");
_BenchmarkCollection_Init(pass,__pRT__,snd);
+_BenchmarkFiles_Init(pass,__pRT__,snd);
_BenchmarkLinkedList_Init(pass,__pRT__,snd);
_BenchmarkSTX1_Init(pass,__pRT__,snd);
_BenchmarkSTX2_Init(pass,__pRT__,snd);
--- a/s/benchmarks/stx/vcmake.bat Mon Mar 21 13:15:35 2016 +0100
+++ b/s/benchmarks/stx/vcmake.bat Mon Mar 21 23:47:50 2016 +0100
@@ -13,8 +13,9 @@
@REM Kludge got Mercurial, cannot be implemented in Borland make
@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+
make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
-
--- a/s/jv_calipel_s.st Mon Mar 21 13:15:35 2016 +0100
+++ b/s/jv_calipel_s.st Mon Mar 21 23:47:50 2016 +0100
@@ -136,6 +136,30 @@
)
! !
+!jv_calipel_s class methodsFor:'utilities - bee'!
+
+beeExportTo: directory
+ "Export Bee Smalltalk packages to given directory"
+
+ Class tryLocalSourceFirst: true.
+
+ #(
+ 'jv:calipel/s'
+ 'jv:calipel/s/benchmarks/micro'
+ 'jv:calipel/s/benchmarks/game'
+ 'jv:calipel/s/tests'
+ ) do:[:each |
+ Smalltalk loadPackage: each.
+ BeeProjectWriter fileOut: each in: directory
+ ].
+
+ "
+ jv_calipel_s beeExportTo: '/tmp'
+ "
+
+ "Created: / 03-11-2015 / 07:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!jv_calipel_s class methodsFor:'utilities - monticello'!
monticelloExportTo: directory
--- a/web/app/models/results_filter.rb Mon Mar 21 13:15:35 2016 +0100
+++ b/web/app/models/results_filter.rb Mon Mar 21 23:47:50 2016 +0100
@@ -14,17 +14,38 @@
BenchmarkConfiguration.where(id: benchmark_configurations.compact)
end
+ # Return benchmark reports (batches in webapp) based on criterie.
+ # The filtering works as folloeing:
+ # * if selected configurations and selected benchmarks are BOTH ARE EMPTYy,
+ # return an empty list.
+ # * if selected CONFIGURATIONS ARE EMPTY, then filter by selected tags.
+ # * if selected TAGS ARE EMPTY, then filter by selected configrations
+ # * if BOTH ARE NON-EMPTY, then return only those having one of the
+ # selected configurations and one of the tags
def filtered_batches
- BenchmarkBatch.
- includes(
- :tags,
- :benchmark_configuration,
- benchmark_results: [
- :benchmark_durations,
- :benchmark_info
- ]).
- where(benchmark_configuration_id: benchmark_configurations.compact).
- order("performed_at desc")
+ benchmark_configurations.compact!
+ benchmark_configurations.reject! { | e | e.empty? }
+ tags.compact!
+ tags.reject! { | e | e.empty? }
+
+ if benchmark_configurations.empty? and tags.empty? then
+ return []
+ end
+ batches = BenchmarkBatch.includes(
+ :tags,
+ :benchmark_configuration,
+ benchmark_results: [
+ :benchmark_durations,
+ :benchmark_info
+ ])
+ if not benchmark_configurations.empty? then
+ batches = batches.where(benchmark_configuration_id: benchmark_configurations)
+ end
+ if not tags.empty? then
+ batches = batches.joins(:tags).where(tags: { id: tags})
+ end
+ batches = batches.order("performed_at desc")
+ return batches
end
end
--- a/web/app/views/index/_benchmarks_table.html.erb Mon Mar 21 13:15:35 2016 +0100
+++ b/web/app/views/index/_benchmarks_table.html.erb Mon Mar 21 23:47:50 2016 +0100
@@ -10,7 +10,11 @@
</tr>
</thead>
<tbody>
- <% batch.benchmark_results.each do |result| %>
+ <%
+ results = batch.benchmark_results.to_a
+ results.sort! { | a, b | a.benchmark_info.name <=> b.benchmark_info.name }
+ %>
+ <% results.each do |result| %>
<tr>
<th><%= result.benchmark_info.name %></th>
<td><%= result.min_duration %></td>
--- a/web/app/views/results/index.html.erb Mon Mar 21 13:15:35 2016 +0100
+++ b/web/app/views/results/index.html.erb Mon Mar 21 23:47:50 2016 +0100
@@ -28,60 +28,66 @@
<% end %>
</div>
-<% @results_filter.benchmark_configurations_relation.each do |configuration| %>
- <div class="row">
- <% panel_id = "panel-for-configuration-#{configuration.id}" %>
- <% panel_body_id = "panel-body-for-configuration-#{configuration.id}" %>
- <div id="<%= panel_id %>" class="panel-group col-xs-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <%= link_to configuration.name,
- "#" + panel_body_id,
- data: { toggle: "collapse",
- parent: "#" + panel_id } %>
- </div>
- <div id="<%= panel_body_id %>" class="panel-collapse">
- <div class="panel-body">
- <%= render "index/timeline_table", benchmark_configuration: configuration %>
+<% filtered_batches = @results_filter.filtered_batches() %>
+<% if not filtered_batches.empty? %>
+ <% @results_filter.benchmark_configurations_relation.each do |configuration| %>
+ <div class="row">
+ <% panel_id = "panel-for-configuration-#{configuration.id}" %>
+ <% panel_body_id = "panel-body-for-configuration-#{configuration.id}" %>
+ <div id="<%= panel_id %>" class="panel-group col-xs-12">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <%= link_to configuration.name,
+ "#" + panel_body_id,
+ data: { toggle: "collapse",
+ parent: "#" + panel_id } %>
+ </div>
+ <div id="<%= panel_body_id %>" class="panel-collapse">
+ <div class="panel-body">
+ <%= render "index/timeline_table", benchmark_configuration: configuration %>
+ </div>
</div>
</div>
</div>
</div>
- </div>
-<% end %>
-
-<div class="row">
+ <% end %>
- <% @results_filter.filtered_batches.each do |batch| %>
- <% panel_id = "benchmark-batch-#{batch.id}" %>
- <% panel_body_id = "benchmark-batch-details-#{batch.id}" %>
- <div id="<%= panel_id %>" class="panel-group col-xs-12">
- <div class="panel panel-default">
- <div class="panel-heading">
- <div class="row">
- <div class="col-xs-4">
- <%= link_to l(batch.performed_at),
- "#" + panel_body_id,
- data: { toggle: "collapse",
- parent: "#" + panel_id } %>
+ <div class="row">
+ <% filtered_batches.each do |batch| %>
+ <% panel_id = "benchmark-batch-#{batch.id}" %>
+ <% panel_body_id = "benchmark-batch-details-#{batch.id}" %>
+ <div id="<%= panel_id %>" class="panel-group col-xs-12">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <div class="row">
+ <div class="col-xs-4">
+ <%= link_to l(batch.performed_at),
+ "#" + panel_body_id,
+ data: { toggle: "collapse",
+ parent: "#" + panel_id } %>
+ </div>
+ <div class="col-xs-6">
+ <%= batch.benchmark_configuration.name %>
+ <%= batch.tags.map(&:name).join(", ") %>
+ </div>
+ <div class="col-xs-2 pull-right text-right">
+ <%= link_to('[json]', archive_path(batch.id, format: 'json')) %>
+ <%= link_to('[csv]', archive_path(batch.id, format: 'csv')) %>
+ </div>
</div>
- <div class="col-xs-6">
- <%= batch.benchmark_configuration.name %>
- <%= batch.tags.map(&:name).join(", ") %>
- </div>
- <div class="col-xs-2 pull-right text-right">
- <%= link_to('[json]', archive_path(batch.id, format: 'json')) %>
- <%= link_to('[csv]', archive_path(batch.id, format: 'csv')) %>
+ </div>
+ <div id="<%= panel_body_id %>" class="panel-collapse collapse">
+ <div class="panel-body">
+ <%= render "index/benchmarks_table", batch: batch %>
</div>
</div>
</div>
- <div id="<%= panel_body_id %>" class="panel-collapse collapse">
- <div class="panel-body">
- <%= render "index/benchmarks_table", batch: batch %>
- </div>
- </div>
</div>
- </div>
- <% end %>
-</div>
+ <% end %>
+ </div>
+<% else %>
+ <div>
+ <p>Sorry, no benchmark reports match the above criterie</p>
+ </div>
+<% end %>
\ No newline at end of file