Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove telemetry #439

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/Bloc-Spec2/BlTelemetryLogger.extension.st

This file was deleted.

14 changes: 3 additions & 11 deletions src/Bloc/BlBaseEventProcessor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Class {
#category : #'Bloc-Space - Events'
}

{ #category : #'as yet unclassified' }
BlBaseEventProcessor class >> space: aSpace [
{ #category : #'instance creation' }
BlBaseEventProcessor class >> space: aSpace [

^ self new
space: aSpace;
yourself
Expand Down Expand Up @@ -49,12 +50,3 @@ BlBaseEventProcessor >> space [
BlBaseEventProcessor >> space: aSpace [
space := aSpace
]

{ #category : #accessing }
BlBaseEventProcessor >> telemetry [
<return: #BlTelemetry>

^ self space
ifNil: [ BlNullTelemetry uniqueInstance ]
ifNotNil: [ :aSpace | aSpace telemetry ]
]
33 changes: 15 additions & 18 deletions src/Bloc/BlElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -445,19 +445,25 @@ BlElement >> applyLayoutSafelyIn: aRectangle context: aBlElementBoundsUpdateCont
"Fast exit if I or any of my children did not request layout update
and if my current bounds are the same as aRectangle"
(self isLayoutRequested or: [
self layout mayInfluencePosition not
or: [ extentChanged or: [ newPosition ~= self position ] ] ])
self layout mayInfluencePosition not or: [
extentChanged or: [ newPosition ~= self position ] ] ])
ifFalse: [ ^ self ].

"! actually change my position and extent !"
self position: newPosition extent: newExtent context: aBlElementBoundsUpdateContext.

"if my extent did not change and if I or any of my children did not request layout we do nothing"
(extentChanged or: [ self isLayoutRequested or: [ self layout mayInfluencePosition ] ])
self
position: newPosition
extent: newExtent
context: aBlElementBoundsUpdateContext.

"if my extent did not change and if I or any of my children did not
request layout we do nothing"
(extentChanged or: [
self isLayoutRequested or: [
self layout mayInfluencePosition ] ])
ifTrue: [
self telemetry
timeSync: [ 'Layout ', self class name ]
during: [ self onLayout: aRectangle context: aBlElementBoundsUpdateContext ] ].
self
onLayout: aRectangle
context: aBlElementBoundsUpdateContext ].

"we are done, mark that there are no layout requests pending"
self privateRequestingLayout: false
Expand Down Expand Up @@ -3820,15 +3826,6 @@ BlElement >> taskQueue [
^ taskQueue
]

{ #category : #accessing }
BlElement >> telemetry [
<return: #BlTelemetry>

^ self space
ifNil: [ BlNullTelemetry uniqueInstance ]
ifNotNil: [ :aSpace | aSpace telemetry ]
]

{ #category : #'children accessing' }
BlElement >> topMostParent [
"Return a topmost parent in a scene graph.
Expand Down
24 changes: 5 additions & 19 deletions src/Bloc/BlKeyboardProcessor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,16 @@ BlKeyboardProcessor >> processKeyDown: anEvent [

self buffer add: anEvent.

aTarget := self telemetry
timeSync: [ 'Find key down target ' ]
during: [ self findTarget ].

aTarget := self findTarget.
anEvent target: aTarget.

self telemetry
timeSync: [ 'Fire key down event ' ]
during: [ self fireEvent: anEvent ].
self fireEvent: anEvent.

aShortcutEvent := BlShortcutEvent new.
aShortcutEvent buffer: self buffer.
aShortcutEvent target: aTarget.
aShortcutEvent modifiers: anEvent modifiers.

self telemetry
timeSync: [ 'Fire shortcut event ' ]
during: [ self fireEvent: aShortcutEvent ].
self fireEvent: aShortcutEvent.

previousShortcutTime := self space time now.

Expand All @@ -146,15 +138,9 @@ BlKeyboardProcessor >> processKeyUp: anEvent [

self buffer remove: anEvent.

aTarget := self telemetry
timeSync: [ 'Find key up target ' ]
during: [ self findTarget ].

aTarget := self findTarget.
anEvent target: aTarget.

self telemetry
timeSync: [ 'Fire key up event ' ]
during: [ self fireEvent: anEvent ].
self fireEvent: anEvent.

self buffer isEmpty
ifTrue: [ preventKeystrokes := false ]
Expand Down
67 changes: 0 additions & 67 deletions src/Bloc/BlMemoryTelemetry.class.st

This file was deleted.

38 changes: 0 additions & 38 deletions src/Bloc/BlNullTelemetry.class.st

This file was deleted.

92 changes: 0 additions & 92 deletions src/Bloc/BlProcessTelemetry.class.st

This file was deleted.

14 changes: 0 additions & 14 deletions src/Bloc/BlSpace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Class {
'frame',
'elementsNeedingPaint',
'elementsNeedingLayout',
'telemetry',
'reference',
'iconStencil',
'rootElement',
Expand Down Expand Up @@ -1199,7 +1198,6 @@ BlSpace >> initialize [
tasks := BlSpaceTaskQueue space: self.
time := BlTime real.
frame := BlSpaceFrame new.
telemetry := BlNullTelemetry uniqueInstance.

rootElement := self defaultRoot.

Expand Down Expand Up @@ -1663,18 +1661,6 @@ BlSpace >> taskQueue [
^ tasks
]

{ #category : #'NOT-USED-telemetry' }
BlSpace >> telemetry [
<return: #BlTelemetry>

^ telemetry
]

{ #category : #'NOT-USED-telemetry' }
BlSpace >> telemetry: aBlTelemetry [
telemetry := aBlTelemetry
]

{ #category : #accessing }
BlSpace >> time [
<return: #BlTime>
Expand Down
7 changes: 2 additions & 5 deletions src/Bloc/BlSpaceFrameEventPhase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ BlSpaceFrameEventPhase >> runOn: aSpace [
"we have to test for existance of the host space before handling each event because
it is possible that a space is closed due to an event"

theSpace telemetry
timeSync: [ 'Process event {1}' format: { anEvent } ]
during: [
theSpace hostSpaceDo: [
theSpace eventDispatcher dispatchEvent: anEvent ] ] ] ].
theSpace hostSpaceDo: [
theSpace eventDispatcher dispatchEvent: anEvent ] ] ].

theSpace hostSpaceDo: [ :aHostSpace | aHostSpace generateEvents ].
theSpace mouseProcessor generateEvents ]
Expand Down
Loading
Loading