File: benchmark-guile.in

package info (click to toggle)
lilypond 2.19.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 76,396 kB
  • sloc: cpp: 79,385; ansic: 75,071; lisp: 59,263; xml: 31,196; python: 22,406; sh: 8,159; yacc: 3,872; perl: 3,507; asm: 1,587; lex: 1,408; makefile: 1,048; tcl: 457; awk: 199; php: 53; csh: 50
file content (48 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (8)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/sh
# Usage: benchmark-guile [-i GUILE-INTERPRETER] [GUILE-BENCHMARK-ARGS]
# If `-i GUILE-INTERPRETER' is omitted, use ${top_builddir}/pre-inst-guile.
# See ${top_srcdir}/benchmark-suite/guile-benchmark for documentation on GUILE-BENCHMARK-ARGS.
#
# Example invocations:
# ./benchmark-guile
# ./benchmark-guile numbers.bm
# ./benchmark-guile -i /usr/local/bin/guile
# ./benchmark-guile -i /usr/local/bin/guile numbers.bm

set -e

top_builddir=@top_builddir_absolute@
top_srcdir=@top_srcdir_absolute@

BENCHMARK_SUITE_DIR=${top_srcdir}/benchmark-suite

if [ x"$1" = x-i ] ; then
    guile=$2
    shift
    shift
else
    guile=${top_builddir}/pre-inst-guile
fi

GUILE_LOAD_PATH=$BENCHMARK_SUITE_DIR
export GUILE_LOAD_PATH

if [ -f "$guile" -a -x "$guile" ] ; then
    echo Benchmarking $guile ... "$@"
    echo with GUILE_LOAD_PATH=$GUILE_LOAD_PATH
else
    echo ERROR: Cannot execute $guile
    exit 1
fi

# documentation searching ignores GUILE_LOAD_PATH.
if [ ! -f guile-procedures.txt ] ; then
   @LN_S@ libguile/guile-procedures.txt .
fi

exec $guile \
    -e main -s "$BENCHMARK_SUITE_DIR/guile-benchmark" \
    --benchmark-suite "$BENCHMARK_SUITE_DIR/benchmarks" \
    --log-file benchmark-guile.log "$@"

# benchmark-guile ends here