mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-14 05:06:16 -08:00
chore(electron): add preload performance markers
This commit is contained in:
1 parent
2cc7d0acb1
commit
e3ce60a35e
19 files changed
+2547
-49
No files matched your search
@@ -23,6 +23,7 @@ export * from './lib/playback-position.interface';
|
||||
export * from './lib/playlist-auto-update.interface';
|
||||
export * from './lib/playlist-backup.interface';
|
||||
export * from './lib/playlist-meta.type';
|
||||
export * from './lib/preload-performance-marker.interface';
|
||||
export * from './lib/playlist-recently-viewed.interface';
|
||||
export * from './lib/playlist-recently-viewed.utils';
|
||||
export * from './lib/playlist-refresh.interface';
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
export const PRELOAD_PERFORMANCE_MARKER_CHANNEL =
|
||||
'IPTVNATOR_PERF_CAPTURE_MARKER';
|
||||
|
||||
export const PRELOAD_PERFORMANCE_METHOD = {
|
||||
DB_GET_APP_PLAYLIST: 'dbGetAppPlaylist',
|
||||
DB_UPSERT_APP_PLAYLIST: 'dbUpsertAppPlaylist',
|
||||
REFRESH_PLAYLIST: 'refreshPlaylist',
|
||||
} as const;
|
||||
|
||||
export type PreloadPerformanceMethod =
|
||||
(typeof PRELOAD_PERFORMANCE_METHOD)[keyof typeof PRELOAD_PERFORMANCE_METHOD];
|
||||
|
||||
export const PRELOAD_PERFORMANCE_PHASE = {
|
||||
ERROR: 'error',
|
||||
START: 'start',
|
||||
SUCCESS: 'success',
|
||||
} as const;
|
||||
|
||||
export type PreloadPerformancePhase =
|
||||
(typeof PRELOAD_PERFORMANCE_PHASE)[keyof typeof PRELOAD_PERFORMANCE_PHASE];
|
||||
|
||||
export const PRELOAD_PERFORMANCE_CORRELATION_STATE = {
|
||||
COMPLETE: 'complete',
|
||||
CORRELATED: 'correlated',
|
||||
INVALID: 'invalid',
|
||||
UNCORRELATED: 'uncorrelated',
|
||||
} as const;
|
||||
|
||||
export type PreloadPerformanceCorrelationStateName =
|
||||
(typeof PRELOAD_PERFORMANCE_CORRELATION_STATE)[keyof typeof PRELOAD_PERFORMANCE_CORRELATION_STATE];
|
||||
|
||||
export const PRELOAD_PERFORMANCE_INVALID_REASON = {
|
||||
CONCURRENT_REFRESH: 'concurrent-refresh',
|
||||
IPC_ERROR: 'ipc-error',
|
||||
MALFORMED_IDENTIFIER: 'malformed-identifier',
|
||||
OUT_OF_ORDER: 'out-of-order',
|
||||
REFRESH_CANCELLED: 'refresh-cancelled',
|
||||
} as const;
|
||||
|
||||
export type PreloadPerformanceInvalidReason =
|
||||
(typeof PRELOAD_PERFORMANCE_INVALID_REASON)[keyof typeof PRELOAD_PERFORMANCE_INVALID_REASON];
|
||||
|
||||
export interface PreloadPerformanceMarker {
|
||||
method: PreloadPerformanceMethod;
|
||||
phase: PreloadPerformancePhase;
|
||||
sourceEpochMs: number;
|
||||
ipcCallId: number;
|
||||
playlistId: string | null;
|
||||
operationId: string | null;
|
||||
correlationState: PreloadPerformanceCorrelationStateName;
|
||||
invalidReason: PreloadPerformanceInvalidReason | null;
|
||||
}
|
||||
Reference in new issue
Block a user