Skip to content

Commit dca3d41

Browse files
authored
Merge pull request #39 from pszypowicz/panel-telemetry
Add debug timing to panel selection
2 parents f17b7c9 + 54394e7 commit dca3d41

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Sources/Cyclist/SwitcherPanel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,14 @@ final class SwitcherPanel {
138138

139139
// Advancing the selection means the user is browsing, so the panel shows
140140
// immediately even if the quick-tap grace delay has not elapsed yet.
141+
// The debug timing covers the on-screen probe and ordering, not the
142+
// deferred SwiftUI render - it answers "does the per-press WindowServer
143+
// round trip cost anything" (issue #37).
141144
func select(index: Int) {
145+
let started = Date()
142146
model.selected = index
143147
show()
148+
Log.debug("panel: select \(Int(Date().timeIntervalSince(started) * 1000))ms rows=\(model.rows.count)")
144149
}
145150

146151
// The WindowServer can silently refuse to bring an existing panel

0 commit comments

Comments
 (0)