Add a performance test for Discover with many fields (#129464)

* Add a dataset with many fields for functional tests

With this commit we add a new dataset that can be used in functional
tests. The dataset is contains 50 documents based on the Elasticsearch
indices stats API of an empty cluster. Each document defines around 5000
properties. It can be used to check rendering performance e.g. in the
discover view.

Closes #126687

* Add performance test for many fields

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Add to hourly tests

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Daniel Mitterdorfer 2022-04-14 13:22:21 +02:00 committed by GitHub
parent 6dbe26f2f7
commit 9fb1b0672f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38190 additions and 0 deletions

View file

@ -20,7 +20,11 @@ sleep 120
cd "$XPACK_DIR"
<<<<<<< HEAD
journeys=("ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard" "many_fields_discover")
=======
journeys=("login" "ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard")
>>>>>>> origin/main
for i in "${journeys[@]}"; do
echo "JOURNEY[${i}] is running"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
{
"attributes": {
"fieldAttrs": "{}",
"fields": "[]",
"runtimeFieldMap": "{}",
"title": "indices-stats*",
"typeMeta": "{}"
},
"coreMigrationVersion": "8.3.0",
"id": "35796250-bb09-11ec-a8e4-a9868e049a39",
"migrationVersion": {
"index-pattern": "8.0.0"
},
"references": [],
"type": "index-pattern",
"updated_at": "2022-04-13T09:07:56.793Z",
"version": "WzQwLDFd"
}

View file

@ -15,6 +15,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
loadTestFile(require.resolve('./flight_dashboard'));
loadTestFile(require.resolve('./web_logs_dashboard'));
loadTestFile(require.resolve('./promotion_tracking_dashboard'));
loadTestFile(require.resolve('./many_fields_discover'));
after(async () => {
await performance.shutdownBrowser();

View file

@ -0,0 +1,56 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrProviderContext } from '../../ftr_provider_context';
import { StepCtx } from '../../services/performance';
export default function manyFieldsDiscover({ getService }: FtrProviderContext) {
describe('many_fields_discover', () => {
const performance = getService('performance');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
before(async () => {
await kibanaServer.importExport.load(
'test/functional/fixtures/kbn_archiver/many_fields_data_view'
);
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/many_fields');
});
after(async () => {
await kibanaServer.importExport.unload(
'test/functional/fixtures/kbn_archiver/many_fields_data_view'
);
await esArchiver.unload('test/functional/fixtures/es_archiver/many_fields');
});
it('many_fields_discover', async () => {
await performance.runUserJourney(
'many_fields_discover',
[
{
name: 'Go to Discover Page',
handler: async ({ page, kibanaUrl }: StepCtx) => {
await page.goto(`${kibanaUrl}/app/discover`);
await page.waitForSelector('[data-test-subj="discoverDocTable"]');
},
},
{
name: 'Expand the first document',
handler: async ({ page }) => {
const expandButtons = page.locator('[data-test-subj="docTableExpandToggleColumn"]');
await expandButtons.first().click();
await page.locator('text="Expanded document"');
},
},
],
{
requireAuth: false,
}
);
});
});
}