Merge remote-tracking branch 'origin/topic/timw/testing-c++-branch-benchmarks'

* origin/topic/timw/testing-c++-branch-benchmarks:
  Fix CI benchmark script to properly urlencode arguments
This commit is contained in:
Tim Wojtulewicz 2023-01-25 08:19:02 -07:00
commit 31ff9a45de
3 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,7 @@
5.2.0-dev.515 | 2023-01-25 08:19:02 -0700
* Fix CI benchmark script to properly urlencode arguments (Tim Wojtulewicz, Corelight)
5.2.0-dev.513 | 2023-01-24 09:01:42 -0700 5.2.0-dev.513 | 2023-01-24 09:01:42 -0700
* Add test for new handling of unknown RDP keyboards (Tim Wojtulewicz, Corelight) * Add test for new handling of unknown RDP keyboards (Tim Wojtulewicz, Corelight)

View file

@ -1 +1 @@
5.2.0-dev.513 5.2.0-dev.515

View file

@ -35,14 +35,24 @@ TARGET="https://${ZEEK_BENCHMARK_HOST}:${ZEEK_BENCHMARK_PORT}${ZEEK_BENCHMARK_EN
set +e set +e
# Make a request to the benchmark host. # Make a request to the benchmark host.
RESULTS=$(curl -sS --stderr - --fail --insecure -X POST -H "Zeek-HMAC: ${HMAC_DIGEST}" -H "Zeek-HMAC-Timestamp: ${TIMESTAMP}" "${TARGET}?branch=${CIRRUS_BRANCH}&build=${BUILD_URL}&build_hash=${BUILD_HASH}&commit=${CIRRUS_CHANGE_IN_REPO}") curl -sS -G --stderr - --fail --insecure -X POST \
-o "/zeek/benchmark-${TIMESTAMP}.log" \
-H "Zeek-HMAC: ${HMAC_DIGEST}" \
-H "Zeek-HMAC-Timestamp: ${TIMESTAMP}" \
--data-urlencode branch=${CIRRUS_BRANCH} \
--data-urlencode build=${BUILD_URL} \
--data-urlencode build_hash=${BUILD_HASH} \
--data-urlencode commit=${CIRRUS_CHANGE_IN_REPO} \
"${TARGET}"
STATUS=$? STATUS=$?
# If we got a bad status back from the host, we want to make sure to mask the host # If we got a bad status back from the host, we want to make sure to mask the host
# and port from the output. # and port from the output.
if [ $STATUS -ne 0 ]; then if [ $STATUS -ne 0 ]; then
RESULTS=$(echo "${RESULTS}" | sed "s/${ZEEK_BENCHMARK_HOST}/<secret>/g" | sed "s/:${ZEEK_BENCHMARK_PORT}/:<secret>/g") cat /zeek/benchmark-${TIMESTAMP}.log | sed "s/${ZEEK_BENCHMARK_HOST}/<secret>/g" | sed "s/:${ZEEK_BENCHMARK_PORT}/:<secret>/g"
else
cat /zeek/benchmark-${TIMESTAMP}.log
fi fi
echo "$RESULTS"
exit $STATUS exit $STATUS