UNPKG

1.22 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2020 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 * as webdriver from 'selenium-webdriver';
12import { Server } from './server';
13import { Measurement } from './types';
14/**
15 * Try to take a measurement in milliseconds from the given browser. Returns
16 * undefined if the measurement is not available (which may just mean we need to
17 * wait some more time).
18 */
19export declare function measure(driver: webdriver.WebDriver, measurement: Measurement, server: Server | undefined): Promise<number | undefined>;
20/**
21 * Return a good-enough label for the given measurement, to disambiguate cases
22 * where there are multiple measurements on the same page.
23 */
24export declare function measurementName(measurement: Measurement): string;