refactor(dev-infra): simplify runBenchmark (#38941)
* Make url and params optional in runBenchmark * Make url optional in openBrowser * Remove unused code from runBenchmark PR Close #38941
This commit is contained in:
parent
75610505c6
commit
b1682526dd
|
@ -13,7 +13,7 @@ import * as webdriver from 'selenium-webdriver';
|
|||
declare var expect: any;
|
||||
|
||||
export function openBrowser(config: {
|
||||
url: string,
|
||||
url?: string,
|
||||
params?: {name: string, value: any}[],
|
||||
ignoreBrowserSynchronization?: boolean
|
||||
}) {
|
||||
|
|
|
@ -34,8 +34,8 @@ export async function runBenchmark({
|
|||
setup,
|
||||
}: {
|
||||
id: string,
|
||||
url: string,
|
||||
params: {name: string, value: any}[],
|
||||
url?: string,
|
||||
params?: {name: string, value: any}[],
|
||||
ignoreBrowserSynchronization?: boolean,
|
||||
microMetrics?: {[key: string]: string},
|
||||
work?: (() => void)|(() => Promise<unknown>),
|
||||
|
@ -46,8 +46,6 @@ export async function runBenchmark({
|
|||
if (setup) {
|
||||
await setup();
|
||||
}
|
||||
const description: {[key: string]: any} = {};
|
||||
params.forEach((param) => description[param.name] = param.value);
|
||||
return runner.sample({
|
||||
id,
|
||||
execute: work,
|
||||
|
|
Loading…
Reference in New Issue