Skip to content

Commit

Permalink
run script in a loop 10 times
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Jun 4, 2020
1 parent 19979b5 commit 6cfa219
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ import { ToolingLog } from '@kbn/dev-utils';
import { NavigationOptions, createUrl, navigateToApps } from './navigation';

export async function capturePageLoadMetrics(log: ToolingLog, options: NavigationOptions) {
const responsesByPageView = await navigateToApps(log, options);
let responsesByPageView = [];
log.debug(`Running script in a loop`);
for (let i = 1; i <= 10; i++) {
try {
responsesByPageView = await navigateToApps(log, options);
} catch (err) {
log.error(`iteration ${i} failed: ${err}`);
}
}

const assetSizeMeasurements = new Map<string, number[]>();

Expand Down

0 comments on commit 6cfa219

Please sign in to comment.