Skip to content

Commit bcd1ba0

Browse files
committed
benchmarks/lockhammer/scripts/show-per-thread-lock-acquires.sh
This script shows the per-thread fairness of lock acquires in one or more result json files. Change-Id: I89a3b42b834c7f6aae3aaded1b4a24ebfbfae5d1
1 parent 110f1ab commit bcd1ba0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: Copyright 2019-2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
# This script shows the per-thread fairness of lock acquires in the result json(s).
7+
8+
# show-per-thread-lock-acquires.sh result1.json [result2.json ...]
9+
10+
# add this to filter only one set of crit/par
11+
#.results[]|select(.nominal_critical==0 and .nominal_parallel==0)|
12+
13+
read -r -d '' CMD <<'EOF'
14+
.results[]|"\(.nominal_critical)\t\(.nominal_parallel)\t\(.num_threads)\t\(.full_concurrency_fraction*10000|round/10000)\t\(.lock_acquires_mean | round )\t\(.lock_acquires_stddev_over_mean * 10000 | round / 10000)\t\(.per_thread_stats | map(.lock_acquires) | sort | join(","))"
15+
EOF
16+
17+
#echo "$CMD"
18+
#exit
19+
20+
(
21+
echo -e "crit\tpar\tnthrds\tfcf\tlock_acquires_mean\tlock_acquires_stddev/mean\tlock_acquires_each_thread\n"
22+
jq -r "$CMD" "$@"
23+
) | column -t

0 commit comments

Comments
 (0)