-
Notifications
You must be signed in to change notification settings - Fork 415
/
analyze-results.sh
executable file
·30 lines (22 loc) · 1.02 KB
/
analyze-results.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
ARTIFACTS_DIR="/artifacts/${CI_JOB_ID}"
REPORTS_DIR="$(pwd)/reports/"
mkdir "${REPORTS_DIR}" || :
# Change threshold for detection of regression
# @see https://github.com/DataDog/relenv-benchmark-analyzer#what-is-a-significant-difference
UNCONFIDENCE_THRESHOLD=2.0
BASELINE_BRANCH=$(github-find-merge-into-branch --for-repo="$CI_PROJECT_NAME" --for-pr="$CI_COMMIT_REF_NAME" || :)
source /benchmark-analyzer/.venv/bin/activate
cd /benchmark-analyzer
./benchmark_analyzer convert \
--framework=GoBench \
--outpath="pr.json" \
--extra-params="{\"dd_trace_go\":\"${CI_COMMIT_REF_NAME}\"}" \
"${ARTIFACTS_DIR}/pr_bench.txt"
./benchmark_analyzer convert \
--framework=GoBench \
--outpath="main.json" \
--extra-params="{\"dd_trace_go\":\"main\"}" \
"${ARTIFACTS_DIR}/main_bench.txt"
./benchmark_analyzer compare pairwise --outpath ${REPORTS_DIR}/report.md --format md-nodejs main.json pr.json
./benchmark_analyzer compare pairwise --outpath ${REPORTS_DIR}/report_full.html --format html main.json pr.json