(ageMs: number)
| 144 | } |
| 145 | |
| 146 | function formatSnapshotAge(ageMs: number): string { |
| 147 | if (ageMs < 1000) return `${Math.round(ageMs)}ms`; |
| 148 | if (ageMs < 60_000) return `${(Math.round(ageMs / 100) / 10).toFixed(1)}s`; |
| 149 | const minutes = ageMs / 60_000; |
| 150 | if (minutes < 60) return `${(Math.round(minutes * 10) / 10).toFixed(1)}m`; |
| 151 | const hours = minutes / 60; |
| 152 | return `${(Math.round(hours * 10) / 10).toFixed(1)}h`; |
| 153 | } |
| 154 | |
| 155 | function formatSnapshotMetaPrefix(data: Record<string, unknown>): string { |
| 156 | const appName = typeof data.appName === 'string' ? data.appName : undefined; |
no outgoing calls
no test coverage detected
searching dependent graphs…