mirror of
https://github.com/yattee/yattee.git
synced 2026-11-02 09:57:20 +00:00
Add performance logging and background diagnostics
Performance Logging (Developer settings) logs a resource sample every 5s in the foreground and background: CPU by area and thread, wakeups, GPU, memory, disk, activity counters as rates (mpv property updates, player time publishes, renders, saves, network, images, CloudKit events, log entries, main run-loop wakeups), SwiftUI body evaluations of the player views, and app/player/battery context. Each foreground/background transition logs a summary of the period. MetricKit metrics and diagnostics (CPU exceptions, hangs) are logged whenever logging is on. Background diagnostics (iOS) log lifecycle, audio session and power events with an app/player/render snapshot and a heartbeat that detects suspension gaps and main-thread stalls. Logs are persisted per session in Caches/Logs and the previous session is included in exports, so logs survive the app being swiped away.
This commit is contained in:
@@ -198,6 +198,7 @@ struct PlayerControlsView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
let _ = PerfCounter.body("PlayerControlsView")
|
||||
GeometryReader { geometry in
|
||||
|
||||
ZStack {
|
||||
@@ -1018,6 +1019,7 @@ struct PlayerControlsView: View {
|
||||
|
||||
private var progressBar: some View {
|
||||
GeometryReader { geometry in
|
||||
let _ = PerfCounter.body("PlayerControlsView.progressBar")
|
||||
ZStack(alignment: .bottomLeading) {
|
||||
if playerState.isLive {
|
||||
// For live streams, show simple red indicator (no scrubbing)
|
||||
|
||||
Reference in New Issue
Block a user