UNPKG

@alithanar/react-automation-profiler

Version:

Automated React profiling and data visualization using React's Profiler API, Puppeteer, and D3.

42 lines (41 loc) 1.1 kB
import { Scenario } from 'automation/automation'; import { Protocol } from 'puppeteer'; export declare enum OutputType { CHART = "chart", JSON = "json" } export interface Options { averageOf: number; changeInterval: number; includeMount: boolean; page: string; port: number; watch: boolean | string; headless: boolean; browserArgs?: string[]; output: OutputType; preloadFilePath?: string; cookies?: Protocol.Network.CookieParam[]; scenarios?: Scenario[]; } export declare type APIOptions = Omit<Options, 'output' | 'watch' | 'changeInterval' | 'port'>; export declare type AutomationLogs = { actualDuration: number; baseDuration: number; commitTime: number; id: string; interactions: Set<Interaction>; phase: string; startTime: number; }; export interface Interaction { id: number; name: string; timestamp: number; } export interface AutomationResult { logs: AutomationLogs[]; numberOfInteractions: number; id: string; } export declare type IResults = Record<string, AutomationResult[]>;