Skip to content

Commit

Permalink
Remove #BlTelemetryMeter as they were removed in Bloc
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchodias committed Feb 13, 2024
1 parent f732951 commit 42a3059
Show file tree
Hide file tree
Showing 19 changed files with 202 additions and 211 deletions.
14 changes: 8 additions & 6 deletions src/BlocBenchs-Old/BlAndreasSystemProfiler.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Class {
#name : #BlAndreasSystemProfiler,
#superclass : #BlMeter,
#name : 'BlAndreasSystemProfiler',
#superclass : 'BlMeter',
#instVars : [
'profiler'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #API }
{ #category : 'API' }
BlAndreasSystemProfiler >> reportsAsPagesUsing: aBuilder [

^ {
Expand Down Expand Up @@ -45,14 +47,14 @@ BlAndreasSystemProfiler >> reportsAsPagesUsing: aBuilder [

]

{ #category : #API }
{ #category : 'API' }
BlAndreasSystemProfiler >> startMetering [

profiler := AndreasSystemProfiler new.
profiler startProfiling
]

{ #category : #API }
{ #category : 'API' }
BlAndreasSystemProfiler >> stopMetering [

profiler stopProfiling
Expand Down
10 changes: 6 additions & 4 deletions src/BlocBenchs-Old/BlBackgroundColorProfileCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
I'm a profiling case with a BlElement that changes background color on each frame with an infinite animation.
"
Class {
#name : #BlBackgroundColorProfileCase,
#superclass : #BlSimpleElementProfileCase,
#category : #'BlocBenchs-Old-ProfileCases'
#name : 'BlBackgroundColorProfileCase',
#superclass : 'BlSimpleElementProfileCase',
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #'instance creation' }
{ #category : 'instance creation' }
BlBackgroundColorProfileCase >> newSteppingAnimation [

| colorGenerator |
Expand Down
22 changes: 12 additions & 10 deletions src/BlocBenchs-Old/BlBoidsProfileCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
Profiling case where Boids example is shown in a space during some seconds.
"
Class {
#name : #BlBoidsProfileCase,
#superclass : #BlFixedDurationProfileCase,
#name : 'BlBoidsProfileCase',
#superclass : 'BlFixedDurationProfileCase',
#instVars : [
'boidsSkyElementClass'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #examples }
{ #category : 'examples' }
BlBoidsProfileCase class >> exampleFFI [

[ | case |
Expand All @@ -25,7 +27,7 @@ BlBoidsProfileCase class >> exampleFFI [
openMeterReports ] fork
]

{ #category : #examples }
{ #category : 'examples' }
BlBoidsProfileCase class >> exampleFPS [

[ | case |
Expand All @@ -39,7 +41,7 @@ BlBoidsProfileCase class >> exampleFPS [
openMeterReports ] fork
]

{ #category : #examples }
{ #category : 'examples' }
BlBoidsProfileCase class >> exampleProfile [

[ | case |
Expand All @@ -53,27 +55,27 @@ BlBoidsProfileCase class >> exampleProfile [
openMeterReports ] fork
]

{ #category : #accessing }
{ #category : 'accessing' }
BlBoidsProfileCase >> boidsSkyElementClass [

^ boidsSkyElementClass
]

{ #category : #accessing }
{ #category : 'accessing' }
BlBoidsProfileCase >> boidsSkyElementClass: aBoidsSkyElementClass [

boidsSkyElementClass := aBoidsSkyElementClass
]

{ #category : #initialization }
{ #category : 'initialization' }
BlBoidsProfileCase >> initialize [

super initialize.

boidsSkyElementClass := BoidsSkyUsingGeometryElement
]

{ #category : #hooks }
{ #category : 'hooks' }
BlBoidsProfileCase >> newElement [

^ boidsSkyElementClass new
Expand Down
18 changes: 10 additions & 8 deletions src/BlocBenchs-Old/BlFFICounter.class.st
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
Class {
#name : #BlFFICounter,
#superclass : #BlMeter,
#name : 'BlFFICounter',
#superclass : 'BlMeter',
#instVars : [
'functionNamesAndCounts',
'frameCount'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #API }
{ #category : 'API' }
BlFFICounter >> reportAsStringOn: aStream [

aStream
<< 'FFI Call Stats'; lf;
<< self reportCallStatsAsString; lf.
]

{ #category : #API }
{ #category : 'API' }
BlFFICounter >> reportCallStatsAsString [

^ String streamContents: [ :stream |
Expand All @@ -27,7 +29,7 @@ BlFFICounter >> reportCallStatsAsString [
]
]

{ #category : #API }
{ #category : 'API' }
BlFFICounter >> reportsAsPagesUsing: aBuilder [

^ {
Expand All @@ -45,7 +47,7 @@ BlFFICounter >> reportsAsPagesUsing: aBuilder [
}
]

{ #category : #API }
{ #category : 'API' }
BlFFICounter >> startMetering [

"Ensure prepared"
Expand All @@ -63,7 +65,7 @@ BlFFICounter >> startMetering [
frameCount := frameCount + 1 ].
]

{ #category : #API }
{ #category : 'API' }
BlFFICounter >> stopMetering [
"Extract relevant information of the global logger, and reset it."

Expand Down
14 changes: 8 additions & 6 deletions src/BlocBenchs-Old/BlFFILogger.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Class {
#name : #BlFFILogger,
#superclass : #BlMeter,
#name : 'BlFFILogger',
#superclass : 'BlMeter',
#instVars : [
'loggerCopy'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #API }
{ #category : 'API' }
BlFFILogger >> reportsAsPagesUsing: aBuilder [

^ { (SpNotebookPage
Expand All @@ -16,7 +18,7 @@ BlFFILogger >> reportsAsPagesUsing: aBuilder [
aBuilder instantiate: TFLCallsPresenter on: loggerCopy ]) }
]

{ #category : #API }
{ #category : 'API' }
BlFFILogger >> startMetering [

"Ensure prepared"
Expand All @@ -28,7 +30,7 @@ BlFFILogger >> startMetering [
TFLCallLogger instance start
]

{ #category : #API }
{ #category : 'API' }
BlFFILogger >> stopMetering [
"Store a copy of the global logger, and reset it."

Expand Down
16 changes: 9 additions & 7 deletions src/BlocBenchs-Old/BlFixedDurationProfileCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@ Profiling case where a BlElement is shown in a space during some seconds.
"
Class {
#name : #BlFixedDurationProfileCase,
#superclass : #BlProfileCase,
#name : 'BlFixedDurationProfileCase',
#superclass : 'BlProfileCase',
#instVars : [
'duration'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #accessing }
{ #category : 'accessing' }
BlFixedDurationProfileCase >> duration [

^ duration
]

{ #category : #accessing }
{ #category : 'accessing' }
BlFixedDurationProfileCase >> duration: aDuration [

duration := aDuration
]

{ #category : #hooks }
{ #category : 'hooks' }
BlFixedDurationProfileCase >> executeBody [

self duration wait
]

{ #category : #initialization }
{ #category : 'initialization' }
BlFixedDurationProfileCase >> initialize [

super initialize.
Expand Down
26 changes: 14 additions & 12 deletions src/BlocBenchs-Old/BlFrameMeter.class.st
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Class {
#name : #BlFrameMeter,
#superclass : #BlMeter,
#name : 'BlFrameMeter',
#superclass : 'BlMeter',
#instVars : [
'process',
'framesAndMicrosendTimestamps',
'frameCount'
],
#category : #'BlocBenchs-Old-ProfileCases'
#category : 'BlocBenchs-Old-ProfileCases',
#package : 'BlocBenchs-Old',
#tag : 'ProfileCases'
}

{ #category : #private }
{ #category : 'private' }
BlFrameMeter >> fpsFrom: frameAndMicrosendTimestampA to: frameAndMicrosendTimestampB [

| totalSeconds |
Expand All @@ -20,21 +22,21 @@ BlFrameMeter >> fpsFrom: frameAndMicrosendTimestampA to: frameAndMicrosendTimest

]

{ #category : #accessing }
{ #category : 'accessing' }
BlFrameMeter >> intermediateFPS [

^ framesAndMicrosendTimestamps overlappingPairsCollect: [ :a :b |
self fpsFrom: a to: b ]
]

{ #category : #private }
{ #category : 'private' }
BlFrameMeter >> registerSampleNow [

framesAndMicrosendTimestamps add:
frameCount -> Time microsecondClockValue
]

{ #category : #printing }
{ #category : 'printing' }
BlFrameMeter >> reportAsStringOn: stream [

stream
Expand Down Expand Up @@ -78,7 +80,7 @@ BlFrameMeter >> reportAsStringOn: stream [

]

{ #category : #API }
{ #category : 'API' }
BlFrameMeter >> reportsAsPagesUsing: aBuilder [

^ { (SpNotebookPage title: 'Frame Report' provider: [
Expand All @@ -87,7 +89,7 @@ BlFrameMeter >> reportsAsPagesUsing: aBuilder [
yourself ]) }
]

{ #category : #API }
{ #category : 'API' }
BlFrameMeter >> startMetering [
"Start a high-priority process that will tally the space's frame id. The id of a space increases on every new frame.
"
Expand Down Expand Up @@ -117,22 +119,22 @@ BlFrameMeter >> startMetering [

]

{ #category : #API }
{ #category : 'API' }
BlFrameMeter >> stopMetering [

process terminate.
process := nil.
]

{ #category : #accessing }
{ #category : 'accessing' }
BlFrameMeter >> totalFPS [

^ self
fpsFrom: framesAndMicrosendTimestamps first
to: framesAndMicrosendTimestamps last
]

{ #category : #accessing }
{ #category : 'accessing' }
BlFrameMeter >> totalSeconds [
"Answer the number of elapsed seconds, expressed as a Float."

Expand Down
Loading

0 comments on commit 42a3059

Please sign in to comment.