-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
67 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/setUpUIBenchmark.st
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,22 @@ | ||
image creation | ||
setUpUIBenchmark | ||
Preferences setFlag: #higherPerformance toValue: true. | ||
DisplayScreen | ||
fullScreenOff; | ||
setNewScreenSize: 1024 @ 768. | ||
|
||
World submorphs | ||
select: [ :ea | ea isKindOf: SimpleButtonMorph ] | ||
thenDo: [ :ea | ea abandon ]. | ||
ReleaseBuilder deleteAllWindows. | ||
|
||
World dockingBars do: [ :b | b addMorph: UIBenchmarkInfoMorph new after: | ||
(b submorphs detect: [:ea | ea isKindOf: AlignmentMorph]) ]. | ||
|
||
BouncingAtomsMorph new | ||
addAtoms: 70; "100 atoms" | ||
extent: 800@600; | ||
center: World center; | ||
openInWorld. | ||
|
||
Smalltalk garbageCollect. |
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
Empty file.
4 changes: 4 additions & 0 deletions
4
src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/initialize.st
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,4 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
self color: Color blue. |
17 changes: 17 additions & 0 deletions
17
src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/step.st
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,17 @@ | ||
stepping and presenter | ||
step | ||
| now mSecs framesPerSec queueSize newContents | | ||
framesSinceLastDisplay := framesSinceLastDisplay + 1. | ||
now := Time millisecondClockValue. | ||
mSecs := now - lastDisplayTime. | ||
(mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue: | ||
[framesPerSec := (framesSinceLastDisplay * 1000) // mSecs. | ||
queueSize := Graal runtime ifNil: [ 'n/a' ] ifNotNil: [ :r | r getCompilationQueueSize asNumber ]. | ||
newContents := 'Frame rate: ', framesPerSec printString, ' fps / Graal queue: ', queueSize. | ||
self contents: newContents. | ||
FileStream stdout nextPutAll: newContents; cr; flush. | ||
lastDisplayTime := now. | ||
framesSinceLastDisplay := 0] | ||
ifFalse: | ||
["Ensure at least one pixel is drawn per frame" | ||
Preferences higherPerformance ifTrue: [self invalidRect: (self position extent: 1@1)]] |
6 changes: 6 additions & 0 deletions
6
src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/methodProperties.json
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,6 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"initialize" : "fn 4/11/2021 13:07", | ||
"step" : "fn 4/11/2021 13:08" } } |
14 changes: 14 additions & 0 deletions
14
src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/properties.json
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,14 @@ | ||
{ | ||
"category" : "TruffleSqueak-Utilities", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "UIBenchmarkInfoMorph", | ||
"pools" : [ | ||
], | ||
"super" : "FrameRateMorph", | ||
"type" : "normal" } |