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

use awk to parse text columns instead of cut (#905)

parent 708fded3
Pipeline #221581 passed with stages
in 53 minutes and 53 seconds
......@@ -17,13 +17,16 @@ 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=$(awk '{ print $2 }' <<< "${line}")
BENCH_RESULT=$(awk '{ print $5 }' <<< "${line}")
# send metric with common results
echo 'parity_benchmark_common_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'${BENCH_NAME}'"} '${BENCH_RESULT}''
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
echo 'parity_benchmark_specific_result_ns{project="'${CI_PROJECT_NAME}'",benchmark="'${BENCH_NAME}'",commit="'${CI_COMMIT_SHORT_SHA}'",cirunner="'${RUNNER_NAME}'"} '${BENCH_RESULT}''
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}"
......
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