listless

A simple list app for Apple platforms
Log | Files | Refs | README | LICENSE

commit 93e9e1d404c4294e263c4c662af02cbc4f2e65cb
parent ffae96dd58cf720164c4468a8c98225675cb782c
Author: Michael Camilleri <[email protected]>
Date:   Wed, 22 Apr 2026 01:29:31 +0900

Support copying all performance metrics

Diffstat:
MListlessiOS/Views/PerfDebugView.swift | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/ListlessiOS/Views/PerfDebugView.swift b/ListlessiOS/Views/PerfDebugView.swift @@ -40,6 +40,7 @@ struct PerfDebugView: View { Menu { Button("Refresh") { refreshTick &+= 1 } Button("Copy Summary") { copySummary() } + Button("Copy All Samples") { copyAllSamples() } Button("Clear All", role: .destructive) { PerfSampler.shared.clear() refreshTick &+= 1 @@ -115,6 +116,24 @@ struct PerfDebugView: View { } UIPasteboard.general.string = lines.joined(separator: "\n") } + + private func copyAllSamples() { + var lines = ["launchStart,msSinceLaunch,callIndex,durationMs,label"] + for launch in launchesMostRecentFirst() { + let iso = ISO8601DateFormatter().string(from: launch.startedAt) + for sample in samples(for: launch.launchID) { + lines.append(String( + format: "%@,%.3f,%d,%.3f,%@", + iso, + sample.msSinceLaunch, + sample.callIndex, + sample.durationMs, + sample.label + )) + } + } + UIPasteboard.general.string = lines.joined(separator: "\n") + } } private struct LabelStat {