aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wagner <dwagner@suse.de>2021-05-24 21:56:19 +0200
committerAnders Roxell <anders.roxell@gmail.com>2021-09-15 10:36:29 +0200
commit26d73c9d07159f99189dceb3e2a5b126b0fbd21b (patch)
tree54a1eee4ec2fd7beb35bc599ec8fc5e6ae10b5cd
parent2be50400d814e476274335d70eae134964c12e32 (diff)
cyclictest: Add dump histogram feature
cyclictest is able to dump the latency histogram. Add the missing interface to enable this features. This option is best used with the JSON result file uploaded to the artifactory for later processing. Signed-off-by: Daniel Wagner <dwagner@suse.de>
-rwxr-xr-xautomated/linux/cyclictest/cyclictest.sh18
-rw-r--r--automated/linux/cyclictest/cyclictest.yaml4
2 files changed, 16 insertions, 6 deletions
diff --git a/automated/linux/cyclictest/cyclictest.sh b/automated/linux/cyclictest/cyclictest.sh
index ab1484a7..efedc560 100755
--- a/automated/linux/cyclictest/cyclictest.sh
+++ b/automated/linux/cyclictest/cyclictest.sh
@@ -16,20 +16,22 @@ THREADS="1"
AFFINITY="0"
DURATION="1m"
BACKGROUND_CMD=""
+HISTOGRAM=""
usage() {
- echo "Usage: $0 [-p priority] [-i interval] [-t threads] [-a affinity] [-D duration ] [-w background_cmd]" 1>&2
+ echo "Usage: $0 [-p priority] [-i interval] [-t threads] [-a affinity] [-D duration ] [-h max_latency ] [-w background_cmd]" 1>&2
exit 1
}
-while getopts ":p:i:t:a:D:w:" opt; do
+while getopts ":p:i:t:a:D:h:w:" opt; do
case "${opt}" in
p) PRIORITY="${OPTARG}" ;;
i) INTERVAL="${OPTARG}" ;;
t) THREADS="${OPTARG}" ;;
- a) AFFINITY="${OPTARG}" ;;
+ a) AFFINITY="${OPTARG}" ;;
D) DURATION="${OPTARG}" ;;
- w) BACKGROUND_CMD="${OPTARG}" ;;
+ h) HISTOGRAM="${OPTARG}" ;;
+ w) BACKGROUND_CMD="${OPTARG}" ;;
*) usage ;;
esac
done
@@ -37,6 +39,12 @@ done
! check_root && error_msg "Please run this script as root."
create_out_dir "${OUTPUT}"
+if [ -n "${HISTOGRAM}" ]; then
+ HISTOGRAM="-h ${HISTOGRAM}"
+else
+ HISTOGRAM=""
+fi
+
# Run cyclictest.
if ! binary=$(command -v cyclictest); then
detect_abi
@@ -47,7 +55,7 @@ fi
background_process_start bgcmd --cmd "${BACKGROUND_CMD}"
"${binary}" -q -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -a "${AFFINITY}" \
- -D "${DURATION}" -m --json="${LOGFILE}"
+ -D "${DURATION}" ${HISTOGRAM} -m --json="${LOGFILE}"
background_process_stop bgcmd
diff --git a/automated/linux/cyclictest/cyclictest.yaml b/automated/linux/cyclictest/cyclictest.yaml
index c5068d9e..4708e56e 100644
--- a/automated/linux/cyclictest/cyclictest.yaml
+++ b/automated/linux/cyclictest/cyclictest.yaml
@@ -38,6 +38,8 @@ params:
AFFINITY: "0"
# Execute cyclictest for given time
DURATION: "5m"
+ # Dump a latency histogram after the run, max latency in us.
+ HISTOGRAM: ""
# Background workload to be run during the meassurement
BACKGROUND_CMD: ""
# Specify url and token for publishing artifacts.
@@ -50,6 +52,6 @@ params:
run:
steps:
- cd ./automated/linux/cyclictest/
- - ./cyclictest.sh -D "${DURATION}" -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -a "${AFFINITY}" -w "${BACKGROUND_CMD}"
+ - ./cyclictest.sh -D "${DURATION}" -p "${PRIORITY}" -i "${INTERVAL}" -t "${THREADS}" -a "${AFFINITY}" -h "${HISTOGRAM}" -w "${BACKGROUND_CMD}"
- ../../utils/upload-to-artifactorial.sh -a "output/cyclictest.json" -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}"
- ../../utils/send-to-lava.sh ./output/result.txt