diff --git a/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/adjustDoMenu.st b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/adjustDoMenu.st index 4555a791a..4eb9c567b 100644 --- a/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/adjustDoMenu.st +++ b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/adjustDoMenu.st @@ -10,5 +10,6 @@ Graal runtime inspect. RPlotMorph example. - TruffleSqueakUtilities setUpImage. +TruffleSqueakUtilities setUpUIBenchmark. - ', Utilities commonRequestStrings contents \ No newline at end of file diff --git a/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/setUpUIBenchmark.st b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/setUpUIBenchmark.st new file mode 100644 index 000000000..5338bfe73 --- /dev/null +++ b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/class/setUpUIBenchmark.st @@ -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. \ No newline at end of file diff --git a/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/methodProperties.json b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/methodProperties.json index d784fa9f4..a875d17aa 100644 --- a/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/methodProperties.json +++ b/src/TruffleSqueak-Utilities.package/TruffleSqueakUtilities.class/methodProperties.json @@ -1,7 +1,7 @@ { "class" : { "adjustAppsMenu" : "fn 3/30/2021 10:24", - "adjustDoMenu" : "fn 3/30/2021 10:30", + "adjustDoMenu" : "fn 4/11/2021 13:10", "arrayStatistics" : "fn 1/27/2021 15:25", "getAllLayouts" : "fn 2/1/2021 14:59", "layoutStatistics" : "fn 1/27/2021 15:26", @@ -19,6 +19,7 @@ "primitiveGetVMObject:" : "fn 3/21/2020 16:23", "registerInWorldMenu" : "fn 3/30/2021 10:31", "setUpImage" : "fn 3/30/2021 10:18", - "setUpTestImage" : "fn 3/30/2021 09:45" }, + "setUpTestImage" : "fn 3/30/2021 09:45", + "setUpUIBenchmark" : "fn 4/11/2021 13:30" }, "instance" : { } } diff --git a/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/README.md b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/initialize.st b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/initialize.st new file mode 100644 index 000000000..f451cc49d --- /dev/null +++ b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + self color: Color blue. \ No newline at end of file diff --git a/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/step.st b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/step.st new file mode 100644 index 000000000..7cb2d4656 --- /dev/null +++ b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/instance/step.st @@ -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)]] \ No newline at end of file diff --git a/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/methodProperties.json b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/methodProperties.json new file mode 100644 index 000000000..72bb52b1d --- /dev/null +++ b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/methodProperties.json @@ -0,0 +1,6 @@ +{ + "class" : { + }, + "instance" : { + "initialize" : "fn 4/11/2021 13:07", + "step" : "fn 4/11/2021 13:08" } } diff --git a/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/properties.json b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/properties.json new file mode 100644 index 000000000..98d959588 --- /dev/null +++ b/src/TruffleSqueak-Utilities.package/UIBenchmarkInfoMorph.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "TruffleSqueak-Utilities", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "UIBenchmarkInfoMorph", + "pools" : [ + ], + "super" : "FrameRateMorph", + "type" : "normal" }