UNPKG

2.02 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
6 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
7 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
8 * Google as part of the polymer project is also subject to an additional IP
9 * rights grant found at http://polymer.github.io/PATENTS.txt
10 */
11import { BenchmarkSpec } from './types';
12import { ResultStatsWithDifferences } from './stats';
13import { Config } from './config';
14import { Server } from './server';
15export declare class Runner {
16 private readonly config;
17 private readonly specs;
18 private readonly servers;
19 private readonly browsers;
20 private readonly bar;
21 private readonly results;
22 /**
23 * How many times we will load a page and try to collect all measurements
24 * before fully failing.
25 */
26 private readonly maxAttempts;
27 /**
28 * Maximum milliseconds we will wait for all measurements to be collected per
29 * attempt before reloading and trying a new attempt.
30 */
31 private readonly attemptTimeout;
32 /**
33 * How many milliseconds we will wait between each poll for measurements.
34 */
35 private readonly pollTime;
36 private completeGithubCheck?;
37 private hitTimeout;
38 constructor(config: Config, servers: Map<BenchmarkSpec, Server>);
39 run(): Promise<Array<ResultStatsWithDifferences> | undefined>;
40 private launchBrowsers;
41 private closeBrowsers;
42 /**
43 * Do one throw-away run per benchmark to warm up our server (especially
44 * when expensive bare module resolution is enabled), and the browser.
45 */
46 private warmup;
47 private recordSamples;
48 private takeMinimumSamples;
49 private takeAdditionalSamples;
50 private takeSamples;
51 makeResults(): ResultStatsWithDifferences[];
52 private outputResults;
53}