Open History to see the last commit
1import type { LinkCaseId } from './cases'
2β
3export type Mode = 'client' | 'ssr'
4export type Variant = 0 | 1
5β
6export type WorkerRequest =
7 | {
8 kind: 'init'
9 mode: Mode
10 caseId: LinkCaseId
11 bundle: string
12 variant: Variant
13 }
14 | { kind: 'measure'; iterations: number; variant: Variant }
15 | { kind: 'stop' }
16β
17export interface BlockSample {
18 wallMs: number
19 cpuMs: number
20 processCpuMs: number
21 iterations: number
22}
23β
24export type WorkerResponse =
25 | { kind: 'ready'; batchMs: number }
26 | { kind: 'sample'; sample: BlockSample }
27 | { kind: 'stopped' }
28 | { kind: 'error'; message: string }