Unverified Commit bd828809 authored by Radu Popa's avatar Radu Popa Committed by GitHub
Browse files

push to promethues-pushgateway and some small fixes (#904)

parent 8431ff7f
Pipeline #221535 passed with stages
in 54 minutes and 21 seconds
......@@ -126,7 +126,7 @@ benchmarks:
check_bench:
stage: check_benchmark
variables:
PROMETHEUS_URL: "http://vm-longterm.parity-build.parity.io"
PROMETHEUS_URL: "https://thanos.parity-mgmt.parity.io"
TRESHOLD: 20
CI_IMAGE: "paritytech/benchmarks:latest"
<<: *kubernetes-env
......
......@@ -11,18 +11,21 @@ then
RESULT_FILE="output.txt"
fi
cat $RESULT_FILE | grep test > $CURRENT_DIR/output_redacted.txt
grep test "${RESULT_FILE}" > "${CURRENT_DIR}"/output_redacted.txt
INPUT="output_redacted.txt"
while IFS= read -r line
do
BENCH_NAME=$(echo $line | cut -f 2 -d ' ')
BENCH_RESULT=$(echo $line | cut -f 5 -d ' ')
BENCH_NAME=$(echo "${line}" | cut -f 2 -d ' ')
BENCH_RESULT=$(echo "${line}" | cut -f 5 -d ' ')
# send metric with common results
curl -d 'parity_benchmark_common_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'$BENCH_NAME'"} '$BENCH_RESULT'' \
-X POST 'http://vm-longterm.parity-build.parity.io/api/v1/import/prometheus'
echo 'parity_benchmark_common_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'${BENCH_NAME}'"} '${BENCH_RESULT}'' \
| curl --data-binary @- "https://pushgateway.parity-build.parity.io/metrics/job/${BENCH_NAME}"
# send metric with detailed results
curl -d 'parity_benchmark_specific_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'$BENCH_NAME'",commit="'${CI_COMMIT_SHORT_SHA}'",cirunner="'${RUNNER_NAME}'"} '$BENCH_RESULT'' \
-X POST 'http://vm-longterm.parity-build.parity.io/api/v1/import/prometheus'
done < "$INPUT"
echo 'parity_benchmark_specific_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'${BENCH_NAME}'",commit="'${CI_COMMIT_SHORT_SHA}'",cirunner="'${RUNNER_NAME}'"} '${BENCH_RESULT}'' \
| curl --data-binary @- "https://pushgateway.parity-build.parity.io/metrics/job/${BENCH_NAME}"
done < "${INPUT}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment