Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ steps:
- exit_status: '*'
limit: 1

- label: '🚢 Performance Tests dataset extraction for scalability benchmarking'
command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
agents:
queue: n2-2
depends_on: tests
# - label: '🚢 Performance Tests dataset extraction for scalability benchmarking'
# command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
# agents:
# queue: n2-2
# depends_on: tests

- label: '📈 Report performance metrics to ci-stats'
command: .buildkite/scripts/steps/functional/report_performance_metrics.sh
Expand Down
43 changes: 27 additions & 16 deletions packages/kbn-journeys/journey/journey_ftr_harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,21 @@ export class JourneyFtrHarness {
}

private async onSetup() {
await Promise.all([
this.setupBrowserAndPage(),
asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => {
await this.esArchiver.load(esArchive);
}),
asyncForEach(this.journeyConfig.getKbnArchives(), async (kbnArchive) => {
await this.kibanaServer.importExport.load(kbnArchive);
}),
]);
await this.setupBrowserAndPage();

if (
process.env.TEST_PERFORMANCE_PHASE === 'WARMUP' ||
process.env.TEST_PERFORMANCE_PHASE === undefined
) {
await Promise.all([
asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => {
await this.esArchiver.load(esArchive);
}),
asyncForEach(this.journeyConfig.getKbnArchives(), async (kbnArchive) => {
await this.kibanaServer.importExport.load(kbnArchive);
}),
]);
}

// It is important that we start the APM transaction after we open the browser and all the test data is loaded
// so that the scalability data extractor can focus on just the APM data produced by Kibana running under test.
Expand Down Expand Up @@ -189,14 +195,19 @@ export class JourneyFtrHarness {
// unloading the test data so that the scalability data extractor can focus on just the APM data produced
// by Kibana running under test.
await this.teardownApm();
await Promise.all([
asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => {

if (
process.env.TEST_PERFORMANCE_PHASE === 'TEST' ||
process.env.TEST_PERFORMANCE_PHASE === undefined
) {
// unload data
await asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => {
await this.esArchiver.unload(esArchive);
}),
asyncForEach(this.journeyConfig.getKbnArchives(), async (kbnArchive) => {
await this.kibanaServer.importExport.unload(kbnArchive);
}),
]);
});
// empty the kibana index
await this.esArchiver.emptyKibanaIndex();
// TODO: delete the kibana index \ clean mappings?
}
}

private async onStepSuccess(step: AnyStep) {
Expand Down
4 changes: 3 additions & 1 deletion src/dev/performance/run_performance_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ run(
log.info(`Found ${journeys.length} journeys to run`);

const failedJourneys = [];
await startEs();

for (const journey of journeys) {
try {
await startEs();
await runWarmup(journey);
await runTest(journey);
} catch (e) {
Expand All @@ -98,6 +98,8 @@ run(
}
}

await procRunner.stop('es');

if (failedJourneys.length > 0) {
throw new Error(`${failedJourneys.length} journeys failed: ${failedJourneys.join(',')}`);
}
Expand Down