[Es Archiver][Load Action] New Overridable Batch Size + Concurrency (#174631)

Adding new defaults for the stream batch size and concurrency.

Now, the default batch size is increased from 300 to 5000.
The default concurrency is set to 4.

## Summary of Performance Characteristics
Using a list of over 70 archives from within the repo, we've benchmarked
the speed before changing the performance characteristics, and after.

One champion example is the
`x-pack/test/functional/es_archives/getting_started/shakespeare`
archive.
It's load time decreased from **~2.5 minutes**, to less than **18
seconds**, in a serverless environment.

There are a little over a handful where the time actually got worse, but
most are only milliseconds slower.
None are a full second slower.


---------

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Tre 2024-01-26 14:42:16 +00:00 committed by GitHub
parent 6842b7713e
commit 63c3ef4808
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 4555 additions and 4457 deletions

View file

@ -3,7 +3,8 @@ id: kibDevDocsOpsEsArchiver
slug: /kibana-dev-docs/ops/es-archiver
title: "ES Archiver"
description: A tool which helps developers capture and restore ES indexes
tags: ['kibana', 'dev', 'contributor', 'operations', 'ci']
date: 2024-01-11
tags: ['kibana', 'dev', 'contributor', 'operations', 'ci', 'es-archiver', 'load', 'es-archiver-load-action', 'performance']
---
The ES Archiver is a service primarily used by the Functional Tests to load up ES indexes using the bulk API which makes the archives more resilient to ES upgrades and easier to inspect/edit locally because they are just plain text files containing newline-delimited JSON (though they are sometimes compressed).
@ -14,4 +15,33 @@ This tool also has a CLI which can be used to save indexes to new archives or lo
To teach the ES Archiver how to talk to ES and Kibana it is ideal to start ES and Kibana using `node scripts/functional_test_servers --config some/config/file.ts` and then use the same `--config` flag when running `node scripts/es_archiver` so that it can access the location and authorization information about the ES instace from the FTR config file.
Additional information about what functionality the CLI provides can be found by running `node scripts/es_archiver --help`
Additional information about what functionality the CLI provides can be found by running `node scripts/es_archiver --help`
## Performance Option Parameter
We now have a performance parameter for the es-archiver#load(), entry-point
function.
This parameter is optional, with defaults:
- Batch size: 5000
- Concurrency (maximum number of bulk requests that can be active in parallel): 4
According to our benchmarks, these default settings are giving the best results in terms of loading time for
the majority of the archives.
However, there might be cases where different settings are needed, so they can be overridden when loading an archive.
### How to override the default performance settings in test files
To control the batch size and concurrency
#### Example
```typescript
await esArchiver.load('x-pack/test/functional/es_archives/getting_started/shakespeare', {
performance: {
batchSize: 300,
concurrency: 1,
},
});
```

View file

@ -6,5 +6,6 @@
* Side Public License, v 1.
*/
export type { LoadActionPerfOptions } from './src/lib/docs';
export { EsArchiver } from './src/es_archiver';
export * from './src/cli';

View file

@ -28,6 +28,7 @@ import {
migrateSavedObjectIndices,
Progress,
createDefaultSpace,
type LoadActionPerfOptions,
} from '../lib';
import soOverrideAllowedList from '../fixtures/override_saved_objects_index/exception_list.json';
@ -58,6 +59,7 @@ export async function loadAction({
client,
log,
kbnClient,
performance,
}: {
inputDir: string;
skipExisting: boolean;
@ -66,6 +68,7 @@ export async function loadAction({
client: Client;
log: ToolingLog;
kbnClient: KbnClient;
performance?: LoadActionPerfOptions;
}) {
const name = relative(REPO_ROOT, inputDir);
const isArchiveInExceptionList = soOverrideAllowedList.includes(name);
@ -104,7 +107,7 @@ export async function loadAction({
isArchiveInExceptionList,
log,
}),
createIndexDocRecordsStream(client, stats, progress, useCreate),
createIndexDocRecordsStream(client, stats, progress, useCreate, performance),
]);
progress.deactivate();

View file

@ -13,7 +13,7 @@ import type { Client } from '@elastic/elasticsearch';
import { ToolingLog } from '@kbn/tooling-log';
import { REPO_ROOT } from '@kbn/repo-info';
import { KbnClient } from '@kbn/test';
import type { LoadActionPerfOptions } from './lib';
import {
saveAction,
loadAction,
@ -22,7 +22,6 @@ import {
emptyKibanaIndexAction,
editAction,
} from './actions';
interface Options {
client: Client;
baseDir?: string;
@ -89,7 +88,13 @@ export class EsArchiver {
skipExisting = false,
useCreate = false,
docsOnly = false,
}: { skipExisting?: boolean; useCreate?: boolean; docsOnly?: boolean } = {}
performance,
}: {
skipExisting?: boolean;
useCreate?: boolean;
docsOnly?: boolean;
performance?: LoadActionPerfOptions;
} = {}
) {
return await loadAction({
inputDir: this.findArchive(path),
@ -99,6 +104,7 @@ export class EsArchiver {
client: this.client,
log: this.log,
kbnClient: this.kbnClient,
performance,
});
}

View file

@ -6,5 +6,8 @@
* Side Public License, v 1.
*/
export { createIndexDocRecordsStream } from './index_doc_records_stream';
export {
createIndexDocRecordsStream,
type LoadActionPerfOptions,
} from './index_doc_records_stream';
export { createGenerateDocRecordsStream } from './generate_doc_records_stream';

View file

@ -140,6 +140,7 @@ it('indexes documents using the bulk client helper', async () => {
"calls": Array [
Array [
Object {
"concurrency": 4,
"datasource": Array [
Object {
"hello": "world",
@ -157,6 +158,7 @@ it('indexes documents using the bulk client helper', async () => {
],
Array [
Object {
"concurrency": 4,
"datasource": Array [
Object {
"hello": "world",

View file

@ -22,7 +22,8 @@ export function createIndexDocRecordsStream(
client: Client,
stats: Stats,
progress: Progress,
useCreate: boolean = false
useCreate: boolean = false,
performance?: LoadActionPerfOptions
) {
async function indexDocs(docs: any[]) {
const operation = useCreate === true ? BulkOperation.Create : BulkOperation.Index;
@ -32,6 +33,7 @@ export function createIndexDocRecordsStream(
await client.helpers.bulk(
{
retries: 5,
concurrency: performance?.concurrency || DEFAULT_PERFORMANCE_OPTIONS.concurrency,
datasource: docs.map((doc) => {
const body = doc.source;
const op = doc.data_stream ? BulkOperation.Create : operation;
@ -68,7 +70,7 @@ export function createIndexDocRecordsStream(
}
return new Writable({
highWaterMark: 300,
highWaterMark: performance?.batchSize || DEFAULT_PERFORMANCE_OPTIONS.batchSize,
objectMode: true,
async write(record, enc, callback) {
@ -92,3 +94,13 @@ export function createIndexDocRecordsStream(
},
});
}
export interface LoadActionPerfOptions {
batchSize: number;
concurrency: number;
}
const DEFAULT_PERFORMANCE_OPTIONS: LoadActionPerfOptions = {
batchSize: 5000,
concurrency: 4,
} as const;

View file

@ -6,7 +6,11 @@
* Side Public License, v 1.
*/
export { createIndexDocRecordsStream, createGenerateDocRecordsStream } from './docs';
export {
createIndexDocRecordsStream,
createGenerateDocRecordsStream,
type LoadActionPerfOptions,
} from './docs';
export {
createCreateIndexStream,

View file

@ -112,7 +112,12 @@ export default function ({ getService }: FtrProviderContext) {
const toTimestamp = '2017-08-16T00:00:00.000Z';
before(async () => {
await esArchiver.load(archive);
await esArchiver.load(archive, {
performance: {
batchSize: 300,
concurrency: 1,
},
});
await updateMonitoringDates(esSupertest, fromTimestamp, toTimestamp, timestamp);
const { body }: { body: UnencryptedTelemetryPayload } = await supertest

File diff suppressed because it is too large Load diff

View file

@ -80,6 +80,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('Generate CSV: new search', () => {
before(async () => {
await reportingAPI.initEcommerce();
/**
* Important: `esArchiver.emptyKibanaIndex()` above also resets the
* Kibana time zone setting, so we're re-applying it here.
* The serverless version of the test uses
* `kibanaServer.savedObjects.cleanStandardList` instead,
* which does not reset the time zone setting,
* so we don't need to re-apply it in these tests.
*/
await kibanaServer.uiSettings.update({ 'dateFormat:tz': 'UTC' });
});
after(async () => {

View file

@ -92,6 +92,10 @@
[
"order_date",
"desc"
],
[
"order_id",
"desc"
]
],
"title": "Ecommerce Data",
@ -806,6 +810,7 @@
"attributes": {
"columns": [
"category",
"order_id",
"customer_full_name",
"taxful_total_price",
"currency"
@ -820,6 +825,10 @@
[
"order_date",
"desc"
],
[
"order_id",
"desc"
]
],
"title": "Customer Betty"

View file

@ -25,7 +25,16 @@ export const getLifecycleMethods = (getService: FtrProviderContext['getService']
return {
async setup(archives: string[] | string) {
const archivesArray = Array.isArray(archives) ? archives : [archives];
await Promise.all(archivesArray.map((archive) => esArchiver.load(archive)));
await Promise.all(
archivesArray.map((archive) =>
esArchiver.load(archive, {
performance: {
batchSize: 300,
concurrency: 1,
},
})
)
);
},
async tearDown() {

View file

@ -21,46 +21,38 @@ Object {
exports[`Reporting APIs CSV Generation from Saved Search ID export from timebased data view timezone formatting export with custom timezone and timeRange from locator params csv file matches 1`] = `
"order_date,category,currency,customer_id,order_id,day_of_week_i,products.created_on,sku
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories,EUR,19,716724,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085
2019-07-11 16:00:00.000,Women's Shoes, Women's Clothing,EUR,45,591503,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0006400064, ZO0150601506
2019-07-11 16:00:00.000,Women's Clothing,EUR,12,591709,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0638206382, ZO0038800388
2019-07-11 16:00:00.000,Men's Clothing,EUR,52,590937,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0297602976, ZO0565605656
2019-07-11 16:00:00.000,Men's Clothing,EUR,29,590976,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0561405614, ZO0281602816
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,41,591636,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0385003850, ZO0408604086
2019-07-11 16:00:00.000,Men's Shoes,EUR,30,591539,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0505605056, ZO0513605136
2019-07-11 16:00:00.000,Men's Clothing,EUR,41,591598,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0276702767, ZO0291702917
2019-07-11 16:00:00.000,Women's Clothing,EUR,44,590927,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0046600466, ZO0050800508
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,48,590970,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0455604556, ZO0680806808
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes,EUR,46,591299,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0229002290, ZO0674406744
2019-07-11 16:00:00.000,Men's Clothing,EUR,36,591133,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0529905299, ZO0617006170
2019-07-11 16:00:00.000,Men's Clothing,EUR,13,591175,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0299402994, ZO0433504335
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,21,591297,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0257502575, ZO0451704517
2019-07-11 16:00:00.000,Men's Clothing,EUR,14,591149,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0584905849, ZO0578405784
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes,EUR,27,591754,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0335803358, ZO0325903259
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes,EUR,42,591803,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0645906459, ZO0324303243
2019-07-11 16:00:00.000,Women's Clothing,EUR,46,592082,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0034400344, ZO0492904929
2019-07-11 16:00:00.000,Women's Shoes, Women's Accessories,EUR,27,591283,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0239302393, ZO0198501985
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,4,591148,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0290302903, ZO0513705137
2019-07-11 16:00:00.000,Men's Accessories, Men's Clothing,EUR,51,591417,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0464504645, ZO0621006210
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,14,591562,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0544305443, ZO0108001080
2019-07-11 16:00:00.000,Women's Clothing, Women's Accessories,EUR,5,590996,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0638106381, ZO0096900969
2019-07-11 16:00:00.000,Women's Shoes,EUR,27,591317,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0366203662, ZO0139501395
2019-07-11 16:00:00.000,Men's Clothing,EUR,38,591362,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0541805418, ZO0594105941
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,30,591411,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0693506935, ZO0532405324
2019-07-11 16:00:00.000,Women's Shoes, Women's Clothing,EUR,5,730531,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0025200252, ZO0217402174, ZO0034800348, ZO0144701447
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes, Women's Accessories,EUR,27,729198,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0331203312, ZO0333603336, ZO0001200012, ZO0699606996
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes, Women's Accessories,EUR,5,726566,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0270902709, ZO0489504895, ZO0236202362, ZO0355903559
2019-07-11 16:00:00.000,Women's Accessories, Women's Shoes, Women's Clothing,EUR,17,726066,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0077700777, ZO0249302493, ZO0213902139, ZO0004200042
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,38,722629,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0424204242, ZO0403504035, ZO0506705067, ZO0395603956
2019-07-11 16:00:00.000,Men's Clothing,EUR,16,591041,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0418704187, ZO0557105571
2019-07-11 16:00:00.000,Women's Clothing,EUR,6,591074,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0268602686, ZO0484704847
2019-07-11 16:00:00.000,Men's Clothing,EUR,7,591349,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0474804748, ZO0560705607
2019-07-11 16:00:00.000,Women's Accessories, Women's Clothing,EUR,44,591374,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0206002060, ZO0268302683
2019-07-11 16:00:00.000,Women's Clothing,EUR,12,591230,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0226902269, ZO0660106601
2019-07-11 16:00:00.000,Women's Shoes, Women's Clothing,EUR,17,591717,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0248002480, ZO0646706467
2019-07-11 16:00:00.000,Women's Shoes,EUR,42,591768,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0005800058, ZO0133901339
2019-07-11 16:00:00.000,Men's Clothing,EUR,21,591810,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0587405874, ZO0590305903
2019-07-11 16:00:00.000,Women's Accessories, Women's Shoes,EUR,22,592049,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0186201862, ZO0018800188
2019-07-11 16:00:00.000,Women's Clothing, Women's Accessories,EUR,28,592097,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0265502655, ZO0201102011
2019-07-11 16:00:00.000,Men's Clothing,EUR,19,590807,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0582105821, ZO0421304213
2019-07-11 16:00:00.000,Men's Accessories, Men's Shoes, Men's Clothing,EUR,19,722468,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0463704637, ZO0687106871, ZO0663006630, ZO0313303133
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,38,722016,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0479704797, ZO0593105931, ZO0685006850, ZO0280802808
2019-07-11 16:00:00.000,Men's Clothing, Men's Accessories,EUR,38,720269,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0292602926, ZO0438504385, ZO0463304633, ZO0629506295
2019-07-11 16:00:00.000,Men's Clothing, Men's Accessories, Men's Shoes,EUR,38,718874,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0612606126, ZO0595905959, ZO0414104141, ZO0513505135
2019-07-11 16:00:00.000,Men's Clothing, Men's Accessories,EUR,25,717374,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0438604386, ZO0312603126, ZO0595205952, ZO0559305593
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing, Women's Accessories, Men's Accessories,EUR,19,716724,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0687606876, ZO0290502905, ZO0126701267, ZO0308503085
2019-07-11 16:00:00.000,Men's Accessories, Men's Clothing,EUR,13,714827,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0314503145, ZO0444804448, ZO0538405384, ZO0630306303
2019-07-11 16:00:00.000,Women's Shoes,EUR,22,591735,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0248402484, ZO0382603826
2019-07-11 16:00:00.000,Men's Clothing, Men's Accessories,EUR,38,713746,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0283802838, ZO0596705967, ZO0446704467, ZO0596405964
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,31,592109,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0396603966, ZO0452704527
2019-07-11 16:00:00.000,Women's Clothing, Women's Accessories,EUR,28,592097,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0265502655, ZO0201102011
2019-07-11 16:00:00.000,Women's Shoes, Women's Clothing,EUR,12,592088,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0026600266, ZO0184501845
2019-07-11 16:00:00.000,Women's Clothing,EUR,46,592082,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0034400344, ZO0492904929
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,51,592079,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0685006850, ZO0440504405
2019-07-11 16:00:00.000,Men's Accessories, Men's Clothing,EUR,23,592064,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0603806038, ZO0616306163
2019-07-11 16:00:00.000,Women's Accessories, Women's Shoes,EUR,22,592049,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0186201862, ZO0018800188
2019-07-11 16:00:00.000,Women's Shoes, Women's Clothing,EUR,6,592046,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0022600226, ZO0484904849
2019-07-11 16:00:00.000,Women's Clothing,EUR,22,592043,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0071900719, ZO0334103341
2019-07-11 16:00:00.000,Men's Clothing,EUR,34,592015,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0621506215, ZO0444504445
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes,EUR,6,591989,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0272202722, ZO0377803778
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,52,591976,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0397103971, ZO0458104581
2019-07-11 16:00:00.000,Women's Accessories, Women's Clothing,EUR,44,591964,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0190101901, ZO0493704937
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,39,591962,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0554305543, ZO0391403914
2019-07-11 16:00:00.000,Women's Clothing, Women's Shoes,EUR,22,591949,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0259402594, ZO0025900259
2019-07-11 16:00:00.000,Men's Clothing, Men's Shoes,EUR,7,591947,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0617606176, ZO0253602536
2019-07-11 16:00:00.000,Men's Clothing,EUR,29,591933,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0113001130, ZO0553705537
2019-07-11 16:00:00.000,Men's Clothing,EUR,38,591924,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0426404264, ZO0533005330
2019-07-11 16:00:00.000,Men's Shoes, Men's Clothing,EUR,19,591919,5,2016-12-30 15:00:00.000, 2016-12-30 15:00:00.000,ZO0511805118, ZO0546605466
"
`;

View file

@ -10,6 +10,7 @@ import type { JobParamsPDFDeprecated } from '@kbn/reporting-export-types-pdf-com
import type { JobParamsPNGV2 } from '@kbn/reporting-export-types-png-common';
import type { JobParamsCSV, JobParamsDownloadCSV } from '@kbn/reporting-export-types-csv-common';
import rison from '@kbn/rison';
import { LoadActionPerfOptions } from '@kbn/es-archiver';
import { FtrProviderContext } from '../ftr_provider_context';
function removeWhitespace(str: string) {
@ -49,8 +50,15 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
);
};
const initEcommerce = async () => {
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce');
const initEcommerce = async (
performance: LoadActionPerfOptions = {
batchSize: 300,
concurrency: 1,
}
) => {
await esArchiver.load('x-pack/test/functional/es_archives/reporting/ecommerce', {
performance,
});
await kibanaServer.importExport.load(ecommerceSOPath);
};
const teardownEcommerce = async () => {

View file

@ -47,7 +47,12 @@ export default function ({ getService }: FtrProviderContext) {
describe('CSV Generation from SearchSource: Dashboard', () => {
before(async () => {
await esArchiver.load(archives.data);
await esArchiver.load(archives.data, {
performance: {
batchSize: 300,
concurrency: 5,
},
});
await kibanaServer.importExport.load(archives.savedObjects);
await kibanaServer.uiSettings.update({
'csv:quoteValues': true,