mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[performance] Re-enable apm extraction step (#136555)
* [kbn-performance-testing-dataset-extractor] add extra logging * re-enable step
This commit is contained in:
parent
568e631737
commit
b72601c283
3 changed files with 16 additions and 9 deletions
|
@ -19,11 +19,11 @@ steps:
|
|||
depends_on: build
|
||||
key: tests
|
||||
|
||||
# - label: ':shipit: Performance Tests dataset extraction for scalability benchmarking'
|
||||
# command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
|
||||
# agents:
|
||||
# queue: n2-2
|
||||
# depends_on: tests
|
||||
- label: ':shipit: Performance Tests dataset extraction for scalability benchmarking'
|
||||
command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
|
||||
agents:
|
||||
queue: n2-2
|
||||
depends_on: tests
|
||||
|
||||
- label: ':chart_with_upwards_trend: Report performance metrics to ci-stats'
|
||||
command: .buildkite/scripts/steps/functional/report_performance_metrics.sh
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
import { Client } from '@elastic/elasticsearch';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { SearchRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
|
||||
interface ClientOptions {
|
||||
node: string;
|
||||
|
@ -81,7 +83,7 @@ const addRangeFilter = (range: { startTime: string; endTime: string }): QueryDsl
|
|||
};
|
||||
};
|
||||
|
||||
export function initClient(options: ClientOptions) {
|
||||
export function initClient(options: ClientOptions, log: ToolingLog) {
|
||||
const client = new Client({
|
||||
node: options.node,
|
||||
auth: {
|
||||
|
@ -119,8 +121,9 @@ export function initClient(options: ClientOptions) {
|
|||
const queryFilters = filters.map((filter) => addBooleanFilter(filter));
|
||||
return await this.getTransactions(queryFilters);
|
||||
},
|
||||
|
||||
async getTransactions(queryFilters: QueryDslQueryContainer[]) {
|
||||
const result = await client.search<Document>({
|
||||
const searchRequest: SearchRequest = {
|
||||
body: {
|
||||
track_total_hits: true,
|
||||
sort: [
|
||||
|
@ -149,7 +152,11 @@ export function initClient(options: ClientOptions) {
|
|||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
log.debug(`Search request: ${JSON.stringify(searchRequest)}`);
|
||||
const result = await client.search<Document>(searchRequest);
|
||||
log.debug(`Search result: ${JSON.stringify(result)}`);
|
||||
return result?.hits?.hits;
|
||||
},
|
||||
};
|
||||
|
|
|
@ -107,7 +107,7 @@ export const extractor = async ({ param, client, log }: CLIParams) => {
|
|||
log.info(
|
||||
`Searching transactions with 'labels.testBuildId=${buildId}' and 'labels.journeyName=${journeyName}'`
|
||||
);
|
||||
const esClient = initClient(authOptions);
|
||||
const esClient = initClient(authOptions, log);
|
||||
const ftrTransactionHits = await esClient.getFtrTransactions(buildId, journeyName);
|
||||
if (!ftrTransactionHits || ftrTransactionHits.length === 0) {
|
||||
log.warning(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue