-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adding Raw Benchs - Migrating Benchs
- Loading branch information
Showing
33 changed files
with
883 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Class { | ||
#name : #BlBBoidsSkyCase, | ||
#superclass : #BlBBlocCase, | ||
#instVars : [ | ||
'element' | ||
], | ||
#category : #'BlocBenchs-Benchs-Bloc' | ||
} | ||
|
||
{ #category : #benchmarking } | ||
BlBBoidsSkyCase class >> benchMatrix [ | ||
|
||
^ ParametrizedTestMatrix new | ||
addCase: { #label -> 'BlBBoidsSkyCase using custom draw'. #element -> BoidsCustomDrawSkyElement new }; | ||
addCase: { #label -> 'BlBBoidsSkyCase using triangle geometry'. #element -> BoidsSkyUsingGeometryElement new }; | ||
addCase: { #label -> 'BlBBoidsSkyCase using custom geometry'. #element -> BoidCustomGeometrySkyElement new }. | ||
] | ||
|
||
{ #category : #accessing } | ||
BlBBoidsSkyCase >> element: aBoidsCustomDrawSkyElement [ | ||
|
||
element := aBoidsCustomDrawSkyElement | ||
] | ||
|
||
{ #category : #'instance creation' } | ||
BlBBoidsSkyCase >> newElement [ | ||
|
||
^ element | ||
] |
11 changes: 0 additions & 11 deletions
11
src/BlocBenchs-Benchs/BlBBoidsSkyUsingCustomDrawCase.class.st
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/BlocBenchs-Benchs/BlBBoidsSkyUsingCustomGeometryElementCase.class.st
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/BlocBenchs-Benchs/BlBBoidsSkyUsingGeometryElementCase.class.st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Class { | ||
#name : #BlBBoxWindmillBlocCase, | ||
#superclass : #BlBBlocCase, | ||
#traits : 'TBlBBoxWindmillLogic', | ||
#classTraits : 'TBlBBoxWindmillLogic classTrait', | ||
#category : #'BlocBenchs-Benchs-Bloc' | ||
} | ||
|
||
{ #category : #'instance creation' } | ||
BlBBoxWindmillBlocCase >> newElement [ | ||
"Answer the Bloc element to be added to the root of the space to setup the benchmark scenario." | ||
|
||
| aContainerElement boxElements startMS | | ||
|
||
aContainerElement := BlElement new | ||
clipChildren: false; | ||
size: self logicalExtent; | ||
background: self backgroundColor; | ||
yourself. | ||
|
||
boxElements := self boxPositions collect: [ :eachPoint | | ||
BlElement new | ||
outskirts: BlOutskirts centered; | ||
size: self boxExtent; | ||
background: self boxColor; | ||
position: eachPoint; | ||
border: (BlBorder | ||
paint: self boxBorderColor | ||
width: self boxBorderWidth); | ||
yourself ]. | ||
aContainerElement addChildren: boxElements. | ||
|
||
startMS := Time millisecondClockValue. | ||
aContainerElement addAnimation: | ||
(BlBasicAnimation new | ||
onStepDo: [ :t | | ||
boxElements do:[ :each | | ||
each transformDo: [ :builder | | ||
builder | ||
centerOrigin; | ||
rotateBy: (self | ||
boxRotationInDegreesWithPosition: each position | ||
elapsedMS: Time millisecondClockValue - startMS) ] ] ]; | ||
yourself). | ||
|
||
^ aContainerElement | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Class { | ||
#name : #BlBClearCanvasRawCase, | ||
#superclass : #BlBRawCase, | ||
#category : #'BlocBenchs-Benchs-Raw' | ||
} | ||
|
||
{ #category : #'as yet unclassified' } | ||
BlBClearCanvasRawCase >> drawOnCairoSurface [ | ||
|
||
self clearCairoSurface | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.