@drupflare/spool 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +279 -1607
- package/dist/angular/index.d.ts +13 -0
- package/dist/angular/index.js +25 -0
- package/dist/angular/pages.d.ts +28 -0
- package/dist/angular/pages.js +85 -0
- package/dist/cdn/client.js +1 -1
- package/dist/cdn/location.d.ts +6 -0
- package/dist/cdn/location.js +8 -0
- package/dist/cdn/manifest.json +7 -7
- package/dist/cdn/spool-sw.js +1 -1
- package/dist/client/bootstrap.d.ts +57 -0
- package/dist/client/bootstrap.js +307 -0
- package/dist/client/contact.d.ts +24 -0
- package/dist/client/contact.js +66 -0
- package/dist/client/declared.d.ts +23 -0
- package/dist/client/declared.js +68 -0
- package/dist/client/entry.js +123 -2
- package/dist/client/gate.d.ts +1 -0
- package/dist/client/gate.js +148 -0
- package/dist/client/index.d.ts +25 -0
- package/dist/client/index.js +1 -0
- package/dist/client/live.d.ts +66 -0
- package/dist/client/live.js +225 -0
- package/dist/client/navigate-entry.d.ts +1 -0
- package/dist/client/navigate-entry.js +4 -0
- package/dist/client/navigate.d.ts +54 -0
- package/dist/client/navigate.js +272 -0
- package/dist/client/persist.d.ts +2 -0
- package/dist/client/persist.js +9 -0
- package/dist/client/register.d.ts +34 -2
- package/dist/client/register.js +64 -7
- package/dist/express/index.d.ts +11 -0
- package/dist/express/index.js +209 -0
- package/dist/hono/index.d.ts +19 -0
- package/dist/hono/index.js +49 -0
- package/dist/next/index.d.ts +33 -0
- package/dist/next/index.js +41 -0
- package/dist/next/pages.d.ts +22 -0
- package/dist/next/pages.js +39 -0
- package/dist/node/listener.d.ts +3 -0
- package/dist/node/listener.js +57 -2
- package/dist/nuxt/index.d.ts +22 -0
- package/dist/nuxt/index.js +104 -0
- package/dist/nuxt/pages.d.ts +26 -0
- package/dist/nuxt/pages.js +48 -0
- package/dist/nuxt/runtime/index.d.ts +24 -0
- package/dist/nuxt/runtime/index.js +58 -0
- package/dist/plugins/coverage.d.ts +14 -0
- package/dist/plugins/coverage.js +27 -0
- package/dist/plugins/mode.d.ts +19 -0
- package/dist/plugins/mode.js +20 -0
- package/dist/plugins/path.d.ts +16 -0
- package/dist/plugins/path.js +139 -0
- package/dist/plugins/report.d.ts +22 -0
- package/dist/plugins/report.js +18 -0
- package/dist/plugins/routes.d.ts +38 -0
- package/dist/plugins/routes.js +52 -0
- package/dist/plugins/static.d.ts +42 -0
- package/dist/plugins/static.js +97 -0
- package/dist/protocol/bundle.d.ts +111 -0
- package/dist/protocol/bundle.js +428 -0
- package/dist/protocol/config.d.ts +80 -1
- package/dist/protocol/config.js +31 -1
- package/dist/protocol/dataset.d.ts +189 -0
- package/dist/protocol/dataset.js +212 -0
- package/dist/protocol/envelope.d.ts +34 -1
- package/dist/protocol/envelope.js +16 -1
- package/dist/protocol/errors.d.ts +1 -1
- package/dist/protocol/graph.d.ts +23 -4
- package/dist/protocol/graph.js +34 -3
- package/dist/protocol/index-rows.d.ts +22 -0
- package/dist/protocol/index-rows.js +53 -0
- package/dist/protocol/index.d.ts +5 -0
- package/dist/protocol/index.js +5 -0
- package/dist/protocol/normalise.d.ts +4 -4
- package/dist/protocol/normalise.js +9 -5
- package/dist/protocol/plan.d.ts +100 -0
- package/dist/protocol/plan.js +661 -0
- package/dist/protocol/provision.d.ts +46 -0
- package/dist/protocol/provision.js +38 -0
- package/dist/protocol/query.d.ts +66 -5
- package/dist/protocol/query.js +103 -4
- package/dist/protocol/ring.d.ts +58 -0
- package/dist/protocol/ring.js +6 -0
- package/dist/protocol/route.d.ts +63 -13
- package/dist/protocol/route.js +126 -6
- package/dist/protocol/tag.d.ts +22 -2
- package/dist/protocol/tag.js +25 -4
- package/dist/protocol/view.d.ts +2 -0
- package/dist/protocol/view.js +8 -2
- package/dist/protocol/views.d.ts +6 -0
- package/dist/protocol/views.js +15 -0
- package/dist/protocol/write.d.ts +234 -0
- package/dist/protocol/write.js +343 -0
- package/dist/proxy/eligible.d.ts +22 -1
- package/dist/proxy/eligible.js +62 -15
- package/dist/proxy/proxy.js +28 -18
- package/dist/react-router/index.d.ts +20 -0
- package/dist/react-router/index.js +60 -0
- package/dist/react-router/pages.d.ts +34 -0
- package/dist/react-router/pages.js +83 -0
- package/dist/report/dataset.d.ts +48 -0
- package/dist/report/dataset.js +93 -0
- package/dist/report/demand.d.ts +49 -0
- package/dist/report/demand.js +60 -0
- package/dist/report/derive.d.ts +285 -0
- package/dist/report/derive.js +676 -1
- package/dist/report/economics.d.ts +66 -1
- package/dist/report/economics.js +208 -1
- package/dist/report/headline.d.ts +158 -0
- package/dist/report/headline.js +473 -0
- package/dist/report/index.d.ts +4 -0
- package/dist/report/index.js +4 -0
- package/dist/report/inputs.d.ts +176 -0
- package/dist/report/inputs.js +248 -0
- package/dist/report/institution.d.ts +188 -1
- package/dist/report/institution.js +146 -0
- package/dist/report/loops.d.ts +73 -0
- package/dist/report/loops.js +101 -0
- package/dist/report/measurement.d.ts +1 -1
- package/dist/report/measurement.js +7 -1
- package/dist/report/model.d.ts +2 -0
- package/dist/report/model.js +4 -0
- package/dist/report/thirdparty.d.ts +57 -0
- package/dist/report/thirdparty.js +111 -0
- package/dist/report/traffic.d.ts +8 -0
- package/dist/report/traffic.js +7 -0
- package/dist/report/trim.d.ts +56 -0
- package/dist/report/trim.js +83 -1
- package/dist/server/bundle.d.ts +55 -0
- package/dist/server/bundle.js +172 -0
- package/dist/server/dataset.d.ts +54 -0
- package/dist/server/dataset.js +355 -0
- package/dist/server/embedded.d.ts +7 -3
- package/dist/server/embedded.js +7 -3
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +6 -0
- package/dist/server/live-sockets.d.ts +54 -0
- package/dist/server/live-sockets.js +131 -0
- package/dist/server/live.d.ts +146 -0
- package/dist/server/live.js +228 -0
- package/dist/server/ring.d.ts +77 -0
- package/dist/server/ring.js +311 -0
- package/dist/server/spool.d.ts +158 -3
- package/dist/server/spool.js +578 -41
- package/dist/server/static.d.ts +42 -0
- package/dist/server/static.js +29 -0
- package/dist/server/stub.d.ts +43 -5
- package/dist/server/stub.js +126 -8
- package/dist/server/write.d.ts +49 -0
- package/dist/server/write.js +223 -0
- package/dist/stores/durable-object.d.ts +46 -0
- package/dist/stores/durable-object.js +114 -0
- package/dist/sw/analytics.d.ts +7 -1
- package/dist/sw/analytics.js +16 -2
- package/dist/sw/coverage.d.ts +6 -0
- package/dist/sw/coverage.js +34 -0
- package/dist/sw/dataset-sync.d.ts +76 -0
- package/dist/sw/dataset-sync.js +149 -0
- package/dist/sw/dataset.d.ts +91 -0
- package/dist/sw/dataset.js +318 -0
- package/dist/sw/family.d.ts +15 -0
- package/dist/sw/family.js +48 -0
- package/dist/sw/graph/index.d.ts +31 -1
- package/dist/sw/graph/index.js +57 -5
- package/dist/sw/graph/invalidate.d.ts +15 -3
- package/dist/sw/graph/invalidate.js +42 -4
- package/dist/sw/idb.d.ts +2 -0
- package/dist/sw/idb.js +80 -11
- package/dist/sw/index.d.ts +2 -0
- package/dist/sw/index.js +1 -0
- package/dist/sw/pack/store.d.ts +128 -0
- package/dist/sw/pack/store.js +737 -0
- package/dist/sw/partition.d.ts +6 -1
- package/dist/sw/partition.js +21 -2
- package/dist/sw/policy.d.ts +2 -0
- package/dist/sw/policy.js +11 -0
- package/dist/sw/principal-dataset.d.ts +64 -0
- package/dist/sw/principal-dataset.js +254 -0
- package/dist/sw/probe.d.ts +16 -0
- package/dist/sw/probe.js +25 -0
- package/dist/sw/render.d.ts +7 -2
- package/dist/sw/render.js +19 -5
- package/dist/sw/replica.d.ts +12 -3
- package/dist/sw/replica.js +40 -5
- package/dist/sw/router.d.ts +3 -2
- package/dist/sw/router.js +15 -2
- package/dist/sw/runtime.d.ts +90 -2
- package/dist/sw/runtime.js +857 -61
- package/dist/sw/scheduler.d.ts +6 -1
- package/dist/sw/scheduler.js +22 -5
- package/dist/sw/seal.d.ts +13 -0
- package/dist/sw/seal.js +13 -4
- package/dist/sw/static.d.ts +18 -0
- package/dist/sw/static.js +84 -1
- package/dist/sw/storage.d.ts +51 -1
- package/dist/sw/storage.js +33 -1
- package/dist/sw/write.d.ts +147 -0
- package/dist/sw/write.js +625 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -2
- package/dist/vite/index.d.ts +26 -0
- package/dist/vite/index.js +66 -0
- package/dist/vue/index.d.ts +36 -0
- package/dist/vue/index.js +53 -0
- package/package.json +65 -4
package/dist/report/derive.d.ts
CHANGED
|
@@ -63,6 +63,37 @@ export declare function saving(a: {
|
|
|
63
63
|
}, b: {
|
|
64
64
|
joules: Spread;
|
|
65
65
|
}): number;
|
|
66
|
+
/** one arm of an idle-activity-tabs reading, per minute and net of its floor */
|
|
67
|
+
export type TabsArm = {
|
|
68
|
+
/** kept windows that had a floor to net against */
|
|
69
|
+
windows: number;
|
|
70
|
+
/** the round's idle draw, or for the three-tab polling arms the quiet window of the same round */
|
|
71
|
+
floor: 'idle' | 'tabs-3-quiet';
|
|
72
|
+
/** package joules per minute above the floor */
|
|
73
|
+
joulesPerMinute: Spread;
|
|
74
|
+
/** origin requests per minute in the window */
|
|
75
|
+
pingsPerMinute: Spread;
|
|
76
|
+
};
|
|
77
|
+
/** the figures of an idle-activity-tabs reading; `ratio` holds arm medians, when both arms exist */
|
|
78
|
+
export type TabsFigures = {
|
|
79
|
+
idleWatts: Spread | null;
|
|
80
|
+
dropped: number;
|
|
81
|
+
/** windows of a three-tab polling arm with no kept tabs-3-quiet window in their round */
|
|
82
|
+
unmatched: number;
|
|
83
|
+
arms: Record<string, TabsArm>;
|
|
84
|
+
ratio: {
|
|
85
|
+
poll3ToLeader?: number;
|
|
86
|
+
poll3ToPoll1?: number;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Joules per minute above the idle draw of each kept window of an idle-activity-tabs run, per arm.
|
|
91
|
+
* A window is dropped over the contamination limit. The idle draw is the median of the kept idle
|
|
92
|
+
* windows of its round. The two three-tab polling arms are netted against the tabs-3-quiet window
|
|
93
|
+
* of the same round, and a window whose round has none is left out. The one-tab and hidden arms
|
|
94
|
+
* are not netted against a quiet arm: the rig has no quiet arm for them.
|
|
95
|
+
*/
|
|
96
|
+
export declare function tabsFigures(rows: readonly Row[]): TabsFigures;
|
|
66
97
|
/** the per-request cost of a locally served model, above the model-resident idle draw */
|
|
67
98
|
export type InferenceFigures = {
|
|
68
99
|
rounds: number;
|
|
@@ -153,6 +184,8 @@ export type NavFigures = {
|
|
|
153
184
|
medianDocBytes: number;
|
|
154
185
|
medianThirdPartyBytes: number;
|
|
155
186
|
};
|
|
187
|
+
/** a navigation that loaded the site's page; a 4xx or 5xx document is a block page, not the site */
|
|
188
|
+
export declare function loaded(nav: Row): boolean;
|
|
156
189
|
/** bytes and request counts by navigation kind, over the navigations that loaded */
|
|
157
190
|
export declare function repeatNavFigures(rows: readonly Row[]): Record<string, NavFigures>;
|
|
158
191
|
/**
|
|
@@ -221,3 +254,255 @@ export type WireFigures = {
|
|
|
221
254
|
};
|
|
222
255
|
/** medians by navigation kind from an on-wire run: rows carry a `wire` summary beside the browser's counts */
|
|
223
256
|
export declare function onWireFigures(rows: readonly Row[]): Record<string, WireFigures>;
|
|
257
|
+
/** the least-squares coefficients of `y` on the columns of `X`, with the residual standard error */
|
|
258
|
+
export type LeastSquares = {
|
|
259
|
+
coef: number[];
|
|
260
|
+
rss: number;
|
|
261
|
+
residualSe: number;
|
|
262
|
+
n: number;
|
|
263
|
+
};
|
|
264
|
+
/** ordinary least squares by the normal equations; `X` rows must each hold every column */
|
|
265
|
+
export declare function leastSquares(X: ReadonlyArray<readonly number[]>, y: readonly number[]): LeastSquares;
|
|
266
|
+
/** a page of the first-view corpus as the run's `method` lists it */
|
|
267
|
+
export type FirstViewPageInfo = {
|
|
268
|
+
id: string;
|
|
269
|
+
site: string;
|
|
270
|
+
wireBytes: number;
|
|
271
|
+
classBytes: Record<string, number>;
|
|
272
|
+
facade: boolean;
|
|
273
|
+
requests?: number;
|
|
274
|
+
};
|
|
275
|
+
/** the first-view figures of one run, every value over the pages it measured */
|
|
276
|
+
export type FirstViewFigures = {
|
|
277
|
+
rounds: number;
|
|
278
|
+
pages: number;
|
|
279
|
+
sites: number;
|
|
280
|
+
wireBytes: number;
|
|
281
|
+
/** windows over the contamination limit, dropped before any figure */
|
|
282
|
+
dropped: number;
|
|
283
|
+
idleWatts: Spread;
|
|
284
|
+
/** metered joules per first view, per page's median over rounds, above idle */
|
|
285
|
+
joules: {
|
|
286
|
+
mean: number;
|
|
287
|
+
median: number;
|
|
288
|
+
};
|
|
289
|
+
/** SWD v4 attributional joules of each page's wire bytes */
|
|
290
|
+
attributional: {
|
|
291
|
+
mean: number;
|
|
292
|
+
median: number;
|
|
293
|
+
};
|
|
294
|
+
ratio: {
|
|
295
|
+
/** mean over pages of metered over attributional */
|
|
296
|
+
mean: number;
|
|
297
|
+
median: number;
|
|
298
|
+
/** metered mean over attributional mean */
|
|
299
|
+
ofMeans: number;
|
|
300
|
+
/** the mean ratio of each site's pages, lowest and highest */
|
|
301
|
+
siteMin: number;
|
|
302
|
+
siteMax: number;
|
|
303
|
+
sites: number;
|
|
304
|
+
};
|
|
305
|
+
/** least-squares fit of metered joules per page on the class bytes, in joules per MB */
|
|
306
|
+
fit: {
|
|
307
|
+
n: number;
|
|
308
|
+
intercept: number;
|
|
309
|
+
image: number;
|
|
310
|
+
script: number;
|
|
311
|
+
other: number;
|
|
312
|
+
residualSe: number;
|
|
313
|
+
/** each term's share of the metered joules over the pages */
|
|
314
|
+
shares: {
|
|
315
|
+
intercept: number;
|
|
316
|
+
image: number;
|
|
317
|
+
script: number;
|
|
318
|
+
other: number;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
/** the facade arm on pages whose iframes it changes; null when no page has one */
|
|
322
|
+
facade: {
|
|
323
|
+
pages: number;
|
|
324
|
+
savedJ: {
|
|
325
|
+
mean: number;
|
|
326
|
+
median: number;
|
|
327
|
+
};
|
|
328
|
+
savedBytes: {
|
|
329
|
+
mean: number;
|
|
330
|
+
median: number;
|
|
331
|
+
};
|
|
332
|
+
savedShare: number;
|
|
333
|
+
} | null;
|
|
334
|
+
missedPages: string[];
|
|
335
|
+
};
|
|
336
|
+
/** the key of the null route in a `drupal-render` reading: arm, URL class and phase */
|
|
337
|
+
export declare const DRUPAL_NULL_KEY = "null/null/steady";
|
|
338
|
+
/** header values an arm's responses carried, counted */
|
|
339
|
+
export type DrupalCacheCounts = {
|
|
340
|
+
page: Record<string, number>;
|
|
341
|
+
dynamic: Record<string, number>;
|
|
342
|
+
};
|
|
343
|
+
/** one arm, URL class and phase of a `drupal-render` reading, per request */
|
|
344
|
+
export type DrupalArmFigures = {
|
|
345
|
+
rounds: number;
|
|
346
|
+
/** joules per request above the round's idle draw, over the rounds */
|
|
347
|
+
gross: Spread;
|
|
348
|
+
/** the same less the null route of that round; null when no round pairs with it */
|
|
349
|
+
net: Spread | null;
|
|
350
|
+
status: Record<string, number>;
|
|
351
|
+
cache: DrupalCacheCounts;
|
|
352
|
+
};
|
|
353
|
+
export type DrupalRenderFigures = {
|
|
354
|
+
rounds: number;
|
|
355
|
+
/** windows over the contamination limit, dropped before any figure */
|
|
356
|
+
dropped: number;
|
|
357
|
+
/** the idle draw of each round: the mean of its kept idle windows */
|
|
358
|
+
idleWatts: Spread;
|
|
359
|
+
arms: Record<string, DrupalArmFigures>;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Joules per request of a `drupal-render` reading. A window's energy less its round's idle draw
|
|
363
|
+
* times its length, over its requests. Each round pairs an arm's window with the null route's
|
|
364
|
+
* window of the same round, so the net figure is paired per round, not a difference of medians.
|
|
365
|
+
*/
|
|
366
|
+
export declare function drupalRenderFigures(rows: readonly Row[]): DrupalRenderFigures;
|
|
367
|
+
/**
|
|
368
|
+
* The first-view figures of a `rapl first-view` reading. A window's joules are its package energy
|
|
369
|
+
* less the idle draw of its round times its length, over its navigations. Each page's figure is the
|
|
370
|
+
* median over the rounds of its original arm; the facade arm is compared with the same page's
|
|
371
|
+
* original arm. The fit is ordinary least squares of each page's joules on its image, script and
|
|
372
|
+
* other bytes, so its coefficients and shares are indicative at this many pages.
|
|
373
|
+
*/
|
|
374
|
+
export declare function firstViewFigures(measurement: Measurement): FirstViewFigures;
|
|
375
|
+
/** one file count at one emulated delay of a chunk-split run, per navigation */
|
|
376
|
+
export type ChunkArmFigures = {
|
|
377
|
+
chunks: number;
|
|
378
|
+
rttMs: number;
|
|
379
|
+
/** windows of this arm, one per round */
|
|
380
|
+
rounds: number;
|
|
381
|
+
/** joules above the round's idle draw per navigation, median and range over rounds */
|
|
382
|
+
joules: Spread;
|
|
383
|
+
/** requests the origin counted per navigation */
|
|
384
|
+
requests: number;
|
|
385
|
+
/** wire bytes the origin sent per navigation */
|
|
386
|
+
bytes: number;
|
|
387
|
+
/** bytes above the one-file arm of the same delay, per navigation */
|
|
388
|
+
bytePenalty: number;
|
|
389
|
+
/** SWD v4 joules of the byte penalty (L2, attributional) */
|
|
390
|
+
penaltyJ: number;
|
|
391
|
+
/** ScriptDuration and TaskDuration in ms per navigation */
|
|
392
|
+
scriptMs: number;
|
|
393
|
+
taskMs: number;
|
|
394
|
+
/** origin CPU milliseconds per navigation */
|
|
395
|
+
originCpuMs: number;
|
|
396
|
+
/** navigations that failed or timed out, summed over the windows */
|
|
397
|
+
navErrors: number;
|
|
398
|
+
};
|
|
399
|
+
/** the line of one delay's file counts: joules on requests, with intervals over rounds */
|
|
400
|
+
export type ChunkFit = {
|
|
401
|
+
rttMs: number;
|
|
402
|
+
/** rounds every file count of this delay measured: the bootstrap's sample */
|
|
403
|
+
rounds: number;
|
|
404
|
+
/** joules per navigation for each extra request */
|
|
405
|
+
slope: Estimate;
|
|
406
|
+
/** joules per navigation at zero requests */
|
|
407
|
+
intercept: Estimate;
|
|
408
|
+
/** ScriptDuration in ms per extra request */
|
|
409
|
+
scriptSlope: Estimate;
|
|
410
|
+
/** TaskDuration in ms per extra request */
|
|
411
|
+
taskSlope: Estimate;
|
|
412
|
+
/** extra requests that cost one joule (1 / slope); null when the slope's interval reaches zero */
|
|
413
|
+
requestsPerJoule: Estimate | null;
|
|
414
|
+
};
|
|
415
|
+
export type ChunkSplitFigures = {
|
|
416
|
+
/** windows over the contamination limit, dropped before any figure */
|
|
417
|
+
dropped: number;
|
|
418
|
+
idleWatts: Spread;
|
|
419
|
+
arms: ChunkArmFigures[];
|
|
420
|
+
/** one fit per delay that measured at least two rounds of every file count */
|
|
421
|
+
fits: ChunkFit[];
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* The device cost of splitting one page's scripts. A window's joules are its package energy less the
|
|
425
|
+
* idle draw of its round, over its navigations, as in `firstViewFigures`. Each file count's figure is
|
|
426
|
+
* the median over rounds. The fit is a least-squares line of joules on requests across the file
|
|
427
|
+
* counts of one delay; its intervals come from a bootstrap over rounds with a fixed seed. Byte
|
|
428
|
+
* penalties are against the one-file arm of the same delay.
|
|
429
|
+
*/
|
|
430
|
+
export declare function chunkSplitFigures(measurement: Measurement): ChunkSplitFigures;
|
|
431
|
+
/** the repeat-view figures of a `first-view-warm` reading, against the cold views of `first-view` */
|
|
432
|
+
export type WarmFigures = {
|
|
433
|
+
rounds: number;
|
|
434
|
+
/** pages measured in both readings */
|
|
435
|
+
pages: number;
|
|
436
|
+
/** windows over the contamination limit in the repeat reading, dropped before any figure */
|
|
437
|
+
dropped: number;
|
|
438
|
+
/** metered joules per repeat view, per page's median over rounds, above idle */
|
|
439
|
+
joules: {
|
|
440
|
+
mean: number;
|
|
441
|
+
median: number;
|
|
442
|
+
};
|
|
443
|
+
/** metered joules per cold first view of the same pages, from the cold reading */
|
|
444
|
+
coldJoules: {
|
|
445
|
+
mean: number;
|
|
446
|
+
median: number;
|
|
447
|
+
};
|
|
448
|
+
/** per page, repeat over cold; mean and median over the pages */
|
|
449
|
+
ratio: {
|
|
450
|
+
mean: number;
|
|
451
|
+
median: number;
|
|
452
|
+
};
|
|
453
|
+
/** median over pages of each term's share of TaskDuration, pooled over a page's navigations */
|
|
454
|
+
taskShare: {
|
|
455
|
+
script: number;
|
|
456
|
+
layout: number;
|
|
457
|
+
recalc: number;
|
|
458
|
+
};
|
|
459
|
+
/** pages whose repeat navigation fetched more than half the bytes its cold view fetched */
|
|
460
|
+
refetch: {
|
|
461
|
+
pages: number;
|
|
462
|
+
share: number;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* The repeat-view figures of a `first-view-warm` reading. A window's joules are its package energy
|
|
467
|
+
* less the idle draw of its round, over its navigations, as in `firstViewFigures`; the cold figure
|
|
468
|
+
* of each page is taken the same way from the cold reading. A page counts when both readings measured
|
|
469
|
+
* it. The term shares divide each page's summed script, layout and style time by its summed task
|
|
470
|
+
* time; the three terms are reported on their own because they may overlap.
|
|
471
|
+
*/
|
|
472
|
+
export declare function warmFigures(warm: Measurement, cold: Measurement): WarmFigures;
|
|
473
|
+
/** a coefficient with its 95% bootstrap interval, the 2.5th and 97.5th percentiles of the resamples */
|
|
474
|
+
export type Estimate = {
|
|
475
|
+
value: number;
|
|
476
|
+
low: number;
|
|
477
|
+
high: number;
|
|
478
|
+
};
|
|
479
|
+
/** a least-squares fit over pages with each coefficient's interval; null when it is not estimable */
|
|
480
|
+
export type FitFigures = {
|
|
481
|
+
pages: number;
|
|
482
|
+
/** resamples that fit; a resample with collinear columns has no unique fit and is dropped */
|
|
483
|
+
replicates: number;
|
|
484
|
+
residualSe: number;
|
|
485
|
+
r2: number;
|
|
486
|
+
coef: Record<string, Estimate>;
|
|
487
|
+
};
|
|
488
|
+
export type FirstViewFit = {
|
|
489
|
+
pages: number;
|
|
490
|
+
/** median over pages of the metered joules per first view, above idle */
|
|
491
|
+
joulesMedian: number;
|
|
492
|
+
/** Pearson correlation of each page's joules with its total wire MB */
|
|
493
|
+
corrTotalMb: number;
|
|
494
|
+
/** intercept, image, script and other MB */
|
|
495
|
+
classFit: FitFigures | null;
|
|
496
|
+
/** intercept and total MB */
|
|
497
|
+
bytesFit: FitFigures | null;
|
|
498
|
+
/** intercept, total MB and requests */
|
|
499
|
+
requestFit: FitFigures | null;
|
|
500
|
+
/** intercept, image, script, other MB and requests */
|
|
501
|
+
classRequestFit: FitFigures | null;
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* The class, bytes and request fits of a `first-view` reading, each with bootstrap intervals over
|
|
505
|
+
* pages. `without` lists hosts whose pages are left out, for a sensitivity check. The request fits
|
|
506
|
+
* need a request count on every page and are null otherwise.
|
|
507
|
+
*/
|
|
508
|
+
export declare function firstViewFit(measurement: Measurement, without?: readonly string[]): FirstViewFit;
|