mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
10 lines
434 B
Bash
Executable file
10 lines
434 B
Bash
Executable file
#!/bin/bash
|
|
|
|
jq -c '.[]' "benchmarks/build/result.json" | while read -r doc; do
|
|
doc=$(echo "$doc" | jq --argjson timestamp "$(date +%s000)" '. + {"@timestamp": $timestamp}')
|
|
echo "Indexing $(echo "$doc" | jq -r '.benchmark')"
|
|
curl -s -X POST "https://$PERF_METRICS_HOST/metrics-microbenchmarks-default/_doc" \
|
|
-u "$PERF_METRICS_USERNAME:$PERF_METRICS_PASSWORD" \
|
|
-H 'Content-Type: application/json' \
|
|
-d "$doc"
|
|
done
|