added a bunch of helper scripts
This commit is contained in:
parent
f72408cd88
commit
a24aeeffe7
6 changed files with 347 additions and 0 deletions
31
run_batch_analyze.sh
Executable file
31
run_batch_analyze.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Usage: ./run_batch_analyze.sh /path/to/trace_root
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 /path/to/trace_root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TRACE_ROOT="$1"
|
||||
|
||||
if [[ ! -d "$TRACE_ROOT" ]]; then
|
||||
echo "Error: '$TRACE_ROOT' is not a directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for dir in "$TRACE_ROOT"/*; do
|
||||
if [[ -d "$dir" ]]; then
|
||||
dirname=$(basename "$dir")
|
||||
# Extract everything before first underscore as type
|
||||
type=$(echo "$dirname" | grep -oP '^[a-z]+(?=_)')
|
||||
if [[ -z "$type" ]]; then
|
||||
echo "Warning: Could not extract type from '$dirname', skipping."
|
||||
continue
|
||||
fi
|
||||
echo "Running batch_analyze.py on $dir with filter ${type}*"
|
||||
./batch_analyze.py -d "$dir" -f "${type}*"
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue