mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
test(performance): add formal M3U import benchmark (#1287)
* test(performance): add formal M3U import benchmark * test(performance): harden formal capture validity * test(performance): address benchmark review feedback
This commit is contained in:
1 parent
26331676f9
commit
24f0dee6f0
80 files changed
+11131
-192
No files matched your search
@@ -19,6 +19,7 @@ export * from './lib/ipc-commands';
|
||||
export * from './lib/language.enum';
|
||||
export * from './lib/m3u-favorite-channel.interface';
|
||||
export * from './lib/parsed-playlist.interface';
|
||||
export * from './lib/performance-phase.interface';
|
||||
export * from './lib/playback-position.interface';
|
||||
export * from './lib/playlist-auto-update.interface';
|
||||
export * from './lib/playlist-backup.interface';
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
export const PERFORMANCE_PHASE_BOUNDARY = {
|
||||
END: 'end',
|
||||
START: 'start',
|
||||
} as const;
|
||||
|
||||
export type PerformancePhaseBoundary =
|
||||
(typeof PERFORMANCE_PHASE_BOUNDARY)[keyof typeof PERFORMANCE_PHASE_BOUNDARY];
|
||||
|
||||
export const M3U_IMPORT_PERFORMANCE_PHASE_EVENT_CHANNEL =
|
||||
'IPTVNATOR_M3U_IMPORT_PERFORMANCE_PHASE_EVENT';
|
||||
|
||||
export const M3U_IMPORT_PERFORMANCE_PHASE = {
|
||||
DATA_ACQUIRE: 'data.acquire',
|
||||
NORMALIZE: 'normalize',
|
||||
PARSE_M3U: 'parse.m3u',
|
||||
} as const;
|
||||
|
||||
export type M3uImportPerformancePhase =
|
||||
(typeof M3U_IMPORT_PERFORMANCE_PHASE)[keyof typeof M3U_IMPORT_PERFORMANCE_PHASE];
|
||||
|
||||
export const APP_PLAYLIST_UPSERT_PERFORMANCE_PHASE = {
|
||||
SERIALIZE_PLAYLIST: 'serialize.playlist',
|
||||
SQLITE_WRITE: 'sqlite.write',
|
||||
} as const;
|
||||
|
||||
export type AppPlaylistUpsertPerformancePhase =
|
||||
(typeof APP_PLAYLIST_UPSERT_PERFORMANCE_PHASE)[keyof typeof APP_PLAYLIST_UPSERT_PERFORMANCE_PHASE];
|
||||
|
||||
export const APP_PLAYLIST_GET_PERFORMANCE_PHASE = {
|
||||
DESERIALIZE_PLAYLIST: 'deserialize.playlist',
|
||||
SQLITE_READ: 'sqlite.read',
|
||||
} as const;
|
||||
|
||||
export type AppPlaylistGetPerformancePhase =
|
||||
(typeof APP_PLAYLIST_GET_PERFORMANCE_PHASE)[keyof typeof APP_PLAYLIST_GET_PERFORMANCE_PHASE];
|
||||
|
||||
export type AppPlaylistPerformancePhase =
|
||||
| AppPlaylistGetPerformancePhase
|
||||
| AppPlaylistUpsertPerformancePhase;
|
||||
|
||||
export interface PerformancePhaseMetadata {
|
||||
readonly byteCount?: number;
|
||||
readonly itemCount?: number;
|
||||
}
|
||||
|
||||
export interface PerformancePhaseEvent<TPhase extends string = string> {
|
||||
readonly boundary: PerformancePhaseBoundary;
|
||||
readonly durationMs: number | null;
|
||||
readonly epochMs: number;
|
||||
readonly metadata?: PerformancePhaseMetadata;
|
||||
readonly phase: TPhase;
|
||||
readonly requestId: string;
|
||||
}
|
||||
Reference in new issue
Block a user