File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,18 @@ if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
94
94
fi
95
95
fi
96
96
97
+ if [[ " ${USE_PERF_CREDENTIALS:- } " == " true" ]]; then
98
+ PERF_METRICS_HOST=$( vault read -field=es_host /secret/ci/elastic-elasticsearch/esbench-metics)
99
+ PERF_METRICS_INDEX=" dummy-micro-benchmarks"
100
+ PERF_METRICS_USERNAME=$( vault read -field=es_username /secret/ci/elastic-elasticsearch/esbench-metics)
101
+ PERF_METRICS_PASSWORD=$( vault read -field=es_password /secret/ci/elastic-elasticsearch/esbench-metics)
102
+
103
+ export PERF_METRICS_HOST
104
+ export PERF_METRICS_INDEX
105
+ export PERF_METRICS_USERNAME
106
+ export PERF_METRICS_PASSWORD
107
+ fi
108
+
97
109
# Authenticate to the Docker Hub public read-only registry
98
110
if which docker > /dev/null 2>&1 ; then
99
111
DOCKERHUB_REGISTRY_USERNAME=" $( vault read -field=username secret/ci/elastic-elasticsearch/docker_hub_public_ro_credentials) "
Original file line number Diff line number Diff line change 2
2
- label : periodic-micro-benchmarks
3
3
command : |
4
4
.ci/scripts/run-gradle.sh :benchmarks:run --args 'org.elasticsearch.benchmark._nightly -rf json -rff build/result.json'
5
+ .buildkite/scripts/index-micro-benchmark-results.sh
6
+ env :
7
+ USE_PERF_CREDENTIALS : " true"
5
8
timeout_in_minutes : 300
6
9
agents :
7
10
provider : gcp
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ jq -c ' .[]' " benchmarks/build/result.json" | while read -r doc; do
4
+ doc=$( echo " $doc " | jq --argjson timestamp " $( date +%s000) " ' . + {"@timestamp": $timestamp}' )
5
+ echo " Indexing $( echo " $doc " | jq -r ' .benchmark' ) "
6
+ curl -s -X POST " https://$PERF_METRICS_HOST /$PERF_METRICS_INDEX /_doc" \
7
+ -u " $PERF_METRICS_USERNAME :$PERF_METRICS_PASSWORD " \
8
+ -H ' Content-Type: application/json' \
9
+ -d " $doc "
10
+ done
You can’t perform that action at this time.
0 commit comments