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 | */
|
11 | import { Opts } from './flags';
|
12 | import { CheckConfig } from './github';
|
13 | import { Horizons } from './stats';
|
14 | import { BenchmarkSpec } from './types';
|
15 | /**
|
16 | * Validated and fully specified configuration.
|
17 | */
|
18 | export interface Config {
|
19 | root: string;
|
20 | sampleSize: number;
|
21 | timeout: number;
|
22 | benchmarks: BenchmarkSpec[];
|
23 | horizons: Horizons;
|
24 | mode: 'automatic' | 'manual';
|
25 | jsonFile: string;
|
26 | legacyJsonFile: string;
|
27 | githubCheck?: CheckConfig;
|
28 | resolveBareModules: boolean;
|
29 | remoteAccessibleHost: string;
|
30 | forceCleanNpmInstall: boolean;
|
31 | csvFileStats: string;
|
32 | csvFileRaw: string;
|
33 | }
|
34 | export declare function makeConfig(opts: Opts): Promise<Config>;
|
35 | export declare function applyDefaults(partial: Partial<Config>): Config;
|
36 | /**
|
37 | * Derives the URL that we'll use to benchmark using the given HTML file or
|
38 | * directory on disk, relative to the root directory we'll be serving. Throws if
|
39 | * it's a file that doesn't exist, or a directory without an index.html.
|
40 | */
|
41 | export declare function urlFromLocalPath(rootDir: string, diskPath: string): Promise<string>;
|
42 | /** Parse horizon flags into signed horizon values. */
|
43 | export declare function parseHorizons(strs: string[]): Horizons;
|