Skip to content

[9.0] Add initial esql test benchmark tests (#126224) #126459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 9.0
Choose a base branch
from
Open
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
13 changes: 8 additions & 5 deletions .buildkite/pipelines/pull-request/build-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ steps:
command: |
.ci/scripts/run-gradle.sh :build-tools-internal:bootstrapPerformanceTests
.ci/scripts/install-gradle-profiler.sh
.ci/scripts/run-gradle-profiler.sh --benchmark --scenario-file build-tools-internal/build/performanceTests/elasticsearch-build-benchmark-{{matrix.part}}.scenarios --project-dir . --output-dir profile-out
mkdir build
tar -czf build/$BUILDKITE_BUILD_NUMBER.tar.bz2 profile-out
.ci/scripts/run-gradle-profiler.sh --benchmark --scenario-file build-tools-internal/build/performanceTests/elasticsearch-{{matrix.part}}.scenarios --measure-config-time --project-dir . --output-dir profile-out
mkdir -p build
buildkite-agent artifact upload "profile-out/*"
cat << EOF | buildkite-agent annotate --style "info"
Benchmark Html Report <a href="artifact://profile-out/benchmark.html">Benchmark Html Report</a>
EOF
matrix:
setup:
part:
- part1
- part2
- esql-tests
env:
BUILD_PERFORMANCE_TEST: "true"

agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/install-gradle-profiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
# profiler version we wanna install
PROFILER_VERSION="0.16.0"
wget https://repo.gradle.org/gradle/ext-releases-local/org/gradle/profiler/gradle-profiler/$PROFILER_VERSION/gradle-profiler-$PROFILER_VERSION.zip -O $WORKSPACE/gradle-profiler-$PROFILER_VERSION.zip
PROFILER_VERSION="0.22.0"
wget https://repo1.maven.org/maven2/org/gradle/profiler/gradle-profiler/$PROFILER_VERSION/gradle-profiler-$PROFILER_VERSION.zip -O $WORKSPACE/gradle-profiler-$PROFILER_VERSION.zip
unzip $WORKSPACE/gradle-profiler-$PROFILER_VERSION.zip
mv $WORKSPACE/gradle-profiler-$PROFILER_VERSION $WORKSPACE/gradle-profiler

This file was deleted.

This file was deleted.

118 changes: 118 additions & 0 deletions build-tools-internal/performance/elasticsearch-esql-tests.scenarios
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
default-scenarios = ["TEST_ESQL_ABI_CHANGE_TAPI", TEST_ESQL_ABI_CHANGE_TAPI_MAIN, "TEST_ESQL_ABI_CHANGE_TAPI_CC", "TEST_ESQL_ABI_CHANGE_TAPI_CC_NOINIT", "TEST_ESQL_ABI_CHANGE_TAPI_CC_MAIN", "TEST_ESQL_ABI_CHANGE_TAPI_CC_NOINIT_MAIN"]

TEST_ESQL_ABI_CHANGE_TAPI {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["-I", ".ci/init.gradle"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}
git-checkout = {
cleanup = "@testGitCommit@"
build = "@testGitCommit@"
}
warm-ups = 3
iterations = 10
}

TEST_ESQL_ABI_CHANGE_TAPI_CC {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["--configuration-cache", "-I", ".ci/init.gradle"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}

git-checkout = {
cleanup = "@testGitCommit@"
build = "@testGitCommit@"
}
warm-ups = 3
iterations = 10
}

TEST_ESQL_ABI_CHANGE_TAPI_CC_NOINIT {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["--configuration-cache"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}

git-checkout = {
cleanup = "@testGitCommit@"
build = "@testGitCommit@"
}
warm-ups = 3
iterations = 10
}

TEST_ESQL_ABI_CHANGE_TAPI_MAIN {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["-I", ".ci/init.gradle"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}
git-checkout = {
cleanup = "main"
build = "main"
}
warm-ups = 3
iterations = 10
}

TEST_ESQL_ABI_CHANGE_TAPI_CC_MAIN {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["--configuration-cache", "-I", ".ci/init.gradle"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}

git-checkout = {
cleanup = "main"
build = "main"
}
warm-ups = 3
iterations = 10
}

TEST_ESQL_ABI_CHANGE_TAPI_CC_NOINIT_MAIN {
apply-abi-change-to = "x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/ColumnInfoImpl.java"
tasks = [":x-pack:plugin:esql:test", "--tests", "org.elasticsearch.gradle.benchmarking.BenchmarkingTests"]
gradle-args = ["--configuration-cache"]
run-using = tooling-api // value can be "cli" or "tooling-api"
daemon = warm // value can be "warm", "cold", or "none"
copy-file = {
source = "build-tools-internal/performance/test-files/BenchmarkingTests.java"
target = "x-pack/plugin/esql/src/test/java/org/elasticsearch/gradle/benchmarking/BenchmarkingTests.java"
schedule = SCENARIO
}
git-checkout = {
cleanup = "main"
build = "main"
}
warm-ups = 3
iterations = 10
}
17 changes: 17 additions & 0 deletions build-tools-internal/performance/test-files/BenchmarkingTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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.
*/

package org.elasticsearch.gradle.benchmarking;

import org.elasticsearch.test.ESTestCase;

public class BenchmarkingTests extends ESTestCase {

public void testBenchmarking() {
assertTrue(true);
}
}