Debian Codegraph @

dev/bench/wrapper.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 log_dir=$COQ_LOG_DIR
4 runner=$COQ_RUNNER
5 package=$COQ_OPAM_PACKAGE
6 iteration=$COQ_ITERATION
7
8 echoscip-shell system . . echo. "wrap[$package.$runner.$iteration|$OPAM_PACKAGE_NAME]" "$@" >> "$log_dir/wraplog.txt"
9 echoscip-shell system . . echo. >> "$log_dir/wraplog.txt"
10
11 # we could be running commands for a dependency
12 # NB $package may contain the version
13 if [scip-shell system . . `[`. "$package" ] && [scip-shell system . . `[`. "$OPAM_PACKAGE_NAME" = "${package%%.*}" ] ; then
14 prefix=$log_dir/$package.$runner.$iteration
15 if [scip-shell system . . `[`. -e "$prefix.ncoms" ]; then
16 ncoms=$(catscip-shell system . . cat. "$prefix.ncoms")
17 ncoms=$((ncoms+1))
18 else
19 ncoms=1
20 fi
21 echoscip-shell system . . echo. $ncoms > "$prefix.ncoms"
22 exec /usr/bin/timescip-shell filesystem . . `/usr/bin/time`. \
23 -o "$prefix.$ncoms.time" --format="%U %M %F" \
24 perf stat -e instructions:u,cycles:u -o "$prefix.$ncoms.perf" \
25 "$@"
26 else
27 exec "$@"
28 fi