mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
run script in a loop 10 times
This commit is contained in:
parent
19979b54bf
commit
6cfa219140
1 changed files with 9 additions and 1 deletions
|
@ -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[]>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue