@@ -1,685 +0,0 @@
1−#!/usr/bin/env bash
2−
3−# Note that this script is used in the "streamly" package as well as
4−# in "streaming-benchmarks" package. Any changes to the script should be
5−# generic enough so that it works in both the cases.
6−
7−#------------------------------------------------------------------------------
8−
9−set -o pipefail
10−
11−SCRIPT_DIR=$(cd `dirname $0`; pwd)
12−
13−RUNNING_BENCHMARKS=y
14−source $SCRIPT_DIR/build-lib.sh
15−
16−print_help () {
17− echo "Usage: $0 "
18− echo " [--benchmarks <"bench1 bench2 ..." | help>]"
19− echo " [--prefix <benchmark name prefix to match>"
20− echo " [--fields <"field1 field2 ..." | help>]"
21− echo " [--sort-by-name]"
22− echo " [--compare]"
23− echo " [--diff-style <absolute|percent|multiples>]"
24− echo " [--diff-cutoff-percent <percent-value>]"
25− echo " [--graphs]"
26− echo " [--silent]"
27− echo " [--no-measure]"
28− echo " [--append]"
29− echo " [--long]"
30− echo " [--slow]"
31− echo " [--quick]"
32− echo " [--raw]"
33− echo " [--dev-build]"
34− echo " [--use-nix]"
35− echo " [--with-compiler <compiler exe name>]"
36− echo " [--cabal-build-options <options>]"
37− echo " [--rtsopts <opts>]"
38− #echo " [--commit-compare] [--base <commit>] [--candidate <commit>]"
39− #echo " -- <gauge options or benchmarks>"
40− echo
41− echo "--benchmarks: benchmarks to run, use 'help' for list of benchmarks"
42− echo "--compare: compare the specified benchmarks with each other"
43−
44− echo "--diff-cutoff-percent: Diff percentage used for benchmark selection."
45− echo "This applies only to the second column of the report and makes sense"
46− echo "only while comparing benchmarks."
47− echo "A positive cutoff value selects only regressions, whereas, a negative"
48− echo "cutoff value selects only improvements."
49−
50− echo "--fields: measurement fields to report, use 'help' for a list"
51− echo "--graphs: Generate graphical reports"
52− echo "--no-measure: Don't run benchmarks, run reports from previous results"
53− echo "--append: Don't overwrite previous results, append for comparison"
54− echo "--long: Use much longer stream size for infinite stream benchmarks"
55− echo "--slow: Slightly more accurate results at the expense of speed"
56− echo "--quick: Faster results, useful for longer benchmarks"
57− echo "--raw: Run the benchmarks but don't report them. This is useful when"
58− echo " you only want to work with the csv files generated."
59− echo "--cabal-build-options: Pass any cabal build options to be used for build"
60− echo " e.g. --cabal-build-options \"--flag dev\""
61− echo
62− echo "When specific space complexity group is chosen then (and only then) "
63− echo "RTS memory restrictions are used accordingly. For example, "
64− echo "bench.sh --benchmarks Data.Parser -- Data.Parser/o-1-space "
65− echo "restricts Heap/Stack space for O(1) characterstics"
66− echo
67− #echo "When using --commit-compare, by default comparative chart of HEAD^ vs HEAD"
68− #echo "commit is generated, in the 'charts' directory."
69− #echo "Use --base and --candidate to select the commits to compare."
70− #echo
71− #echo "Any arguments after a '--' are passed directly to gauge"
72− exit
73−}
74−
75−#-----------------------------------------------------------------------------
76−# Reporting utility functions
77−#-----------------------------------------------------------------------------
78−
79−list_comparisons () {
80− echo "Comparison groups:"
81− for i in $COMPARISONS
82− do
83− echo -n "$i ["
84− eval "echo -n \$$i"
85− echo "]"
86− done
87− echo
88−}
89−
90−build_report_prog() {
91− local prog_path=$BENCH_REPORT_DIR/bin/bench-report
92−
93− hash -r
94− if test ! -x "$prog_path" -a "$BUILD_ONCE" = "0"
95− then
96− echo "Building bench-report executables"
97− BUILD_ONCE=1
98− pushd $BENCH_REPORT_DIR
99− local cmd
100− cmd="$CABAL_EXECUTABLE install --installdir bin bench-report"
101− if test "$USE_NIX" -eq 0
102− then
103− $cmd || die "bench-report build failed"
104− else
105− nix-shell --run "$cmd" || die "bench-report build failed"
106− fi
107− popd
108− elif test ! -x "$prog_path"
109− then
110− return 1
111− fi
112− return 0
113−}
114−
115−build_report_progs() {
116− if test "$RAW" = "0"
117− then
118− build_report_prog || exit 1
119− local prog
120− prog=$BENCH_REPORT_DIR/bin/bench-report
121− test -x $prog || die "Cannot find bench-report executable"
122− echo "Using bench-report executable [$prog]"
123− fi
124−}
125−
126−# We run the benchmarks in isolation in a separate process so that different
127−# benchmarks do not interfere with other. To enable that we need to pass the
128−# benchmark exe path to gauge as an argument. Unfortunately it cannot find its
129−# own path currently.
130−
131−# The path is dependent on the architecture and cabal version.
132−
133−bench_output_file() {
134− local bench_name=$1
135− echo "charts/$bench_name/results.csv"
136−}
137−
138−#------------------------------------------------------------------------------
139−# Speed options
140−#------------------------------------------------------------------------------
141−
142−# tasty-bench does not like an option set twice
143−set_super_quick_mode () {
144− echo -n super_quick
145−}
146−
147−# For certain long benchmarks if the user has not requested super quick
148−# mode we anyway use a slightly quicker mode.
149−use_quicker_mode () {
150− if test "$QUICK_MODE" -eq 0
151− then
152− echo quicker
153− fi
154−}
155−
156−#------------------------------------------------------------------------------
157−# Determine options from benchmark name
158−#------------------------------------------------------------------------------
159−
160−# Global environment passed:
161−# BENCH_EXEC_PATH: the benchmark executable
162−# RTS_OPTIONS: additional RTS options
163−# QUICK_MODE: whether we are in quick mode
164−# USE_GAUGE: whether to use gauge or tasty-bench
165−# LONG: whether to use a large stream size
166−
167−# $1: bench name
168−bench_exec_one() {
169− local BENCH_NAME_ORIG
170− BENCH_NAME_ORIG="$1"
171− shift
172−
173− local SUPER_QUICK_OPTIONS
174− local QUICKER_OPTIONS
175− if test "$USE_GAUGE" -eq 0
176− then
177− SUPER_QUICK_OPTIONS="--stdev 1000000"
178− QUICKER_OPTIONS="--stdev 100"
179− else
180− # Do not keep time limit as 0 otherwise GC stats may remain 0 in some cases.
181− SUPER_QUICK_OPTIONS="--quick --min-duration 0 --time-limit 0.01 --include-first-iter"
182− QUICKER_OPTIONS="--min-samples 3 --time-limit 1"
183− fi
184−
185− local BENCH_NAME0
186− local BENCH_NAME1
187− local BENCH_NAME2
188− local BENCH_NAME
189− # XXX this is a hack to make the "/" separated names used in the functions
190− # determining options based on benchmark name. For tasty-bench the benchmark
191− # names are separated by "." instead of "/" and are prefixed by "All".
192− #
193− # For example, All.Prelude.Serial/x.y.z => Prelude.Serial/x/y/z
194− if test "$USE_GAUGE" -eq 0
195− then
196− # Remove the prefix "All."
197− BENCH_NAME0=$(echo $BENCH_NAME_ORIG | sed -e s/^All\.//)
198−
199− # Module names could contain dots e.g. "Prelude.Serial". So we insert
200− # an explicit "/" to separate the module name part and the rest of
201− # the benchmark name. For example, Prelude.Serial/elimination.drain
202− BENCH_NAME1=$(echo $BENCH_NAME0 | cut -f1 -d '/')
203−
204− if test "$BENCH_NAME1" = "$BENCH_NAME0"
205− then
206− # There is no "/" separator
207− BENCH_NAME1=$(echo $BENCH_NAME0 | sed -e 's/\./\//g')
208− BENCH_NAME2=""
209− else
210− BENCH_NAME2=/$(echo $BENCH_NAME0 | cut -f2- -d '/' | sed -e 's/\./\//g')
211− fi
212− BENCH_NAME="${BENCH_NAME1}${BENCH_NAME2}"
213− else
214− BENCH_NAME=$BENCH_NAME_ORIG
215− fi
216−
217− local RTS_OPTIONS1
218− RTS_OPTIONS1="\
219−+RTS -T \
220−$(bench_rts_options $(basename $BENCH_EXEC_PATH) $BENCH_NAME) \
221−$RTS_OPTIONS \
222−-RTS"
223−
224− local QUICK_MODE_TYPE
225− QUICK_MODE_TYPE="\
226− $(if test "$QUICK_MODE" -ne 0; then set_super_quick_mode; fi) \
227− $(bench_speed_options $(basename $BENCH_EXEC_PATH) $BENCH_NAME)"
228−
229− local QUICK_BENCH_OPTIONS
230− for i in $QUICK_MODE_TYPE
231− do
232− case "$i" in
233− super_quick) QUICK_BENCH_OPTIONS="$SUPER_QUICK_OPTIONS"; break ;;
234− quicker) QUICK_BENCH_OPTIONS="$QUICKER_OPTIONS"; break ;;
235− esac
236− done
237−
238− local STREAM_SIZE
239− local STREAM_LEN
240− local STREAM_SIZE_OPT
241− if test "$LONG" -ne 0
242− then
243− STREAM_SIZE=10000000
244− STREAM_LEN=$(env LC_ALL=en_US.UTF-8 printf "--stream-size %'.f\n" $STREAM_SIZE)
245− STREAM_SIZE_OPT="--stream-size $STREAM_SIZE"
246− fi
247−
248− echo "$BENCH_NAME_ORIG: \
249− $RTS_OPTIONS1 \
250− $STREAM_LEN \
251− $QUICK_BENCH_OPTIONS" \
252− "$@"
253−
254− #------------------------------------------------------------------------------
255− # Run benchmark with options and collect results
256− #------------------------------------------------------------------------------
257−
258− local output_file
259− output_file=$(bench_output_file $(basename $BENCH_EXEC_PATH))
260− mkdir -p `dirname $output_file`
261− rm -f ${output_file}.tmp
262−
263− local BENCH_NAME_ESC
264− if test $USE_GAUGE -eq 0
265− then
266− # Escape "\" and double quotes in benchmark names
267− BENCH_NAME_ESC=$(echo "$BENCH_NAME_ORIG" | sed -e 's/\\/\\\\/g' | sed -e 's/"/\\"/g')
268− $BENCH_EXEC_PATH \
269− -j 1 \
270− $RTS_OPTIONS1 \
271− $STREAM_SIZE_OPT \
272− $QUICK_BENCH_OPTIONS \
273− "$@" \
274− --csv=${output_file}.tmp \
275− -p '$0 == "'"$BENCH_NAME_ESC"'"' || die "Benchmark execution failed."
276−
277− # Convert cpuTime field from picoseconds to seconds
278− awk --version 2>&1 | grep -q "GNU Awk" \
279− || die "Need GNU awk. [$(which awk)] is not GNU awk."
280− tail -n +2 ${output_file}.tmp | \
281− awk 'BEGIN {FPAT = "([^,]+)|(\"[^\"]+\")";OFS=","} {$2=$2/1000000000000;print}' \
282− >> $output_file
283− else
284− $BENCH_EXEC_PATH \
285− $RTS_OPTIONS1 \
286− $STREAM_SIZE_OPT \
287− $QUICK_BENCH_OPTIONS \
288− "$@" \
289− --csvraw=${output_file}.tmp \
290− -m exact "$BENCH_NAME" || die "Benchmark execution failed."
291− tail -n +2 ${output_file}.tmp \
292− >> $output_file
293− fi
294−}
295−
296−invoke_gauge () {
297− local target_prog="$1"
298− local target_name="$2"
299− local output_file="$3"
300−
301− local MATCH=""
302− if test "$LONG" -ne 0
303− then
304− MATCH="$target_name/o-1-space"
305− else
306− MATCH="$BENCH_PREFIX"
307− fi
308− echo "name,iters,time,cycles,cpuTime,utime,stime,maxrss,minflt,majflt,nvcsw,nivcsw,allocated,numGcs,bytesCopied,mutatorWallSeconds,mutatorCpuSeconds,gcWallSeconds,gcCpuSeconds" >> $output_file
309− # keep only benchmark names with shortest prefix e.g. "a/b/c" and "a/b", we
310− # should only keep "a/b" otherwise benchmarks will run multiple times. why?
311− $target_prog -l \
312− | grep "^$MATCH" \
313− | while read -r name; \
314− do bench_exec_one "$name" "${GAUGE_ARGS[@]}" || exit 1; done \
315− || die "Benchmark execution failed."
316−}
317−
318−invoke_tasty_bench () {
319− local target_prog="$1"
320− local target_name="$2"
321− local output_file="$3"
322−
323− local MATCH=""
324− if test "$LONG" -ne 0
325− then
326− MATCH="-p /$target_name\/o-1-space/"
327− else
328− if test -n "$BENCH_PREFIX"
329− then
330− # escape "/"
331− local escaped_name=$(echo "$BENCH_PREFIX" | sed -e 's/\//\\\//g')
332− MATCH="-p /$escaped_name/"
333− fi
334− fi
335− echo "Name,cpuTime,2*Stdev (ps),Allocated,bytesCopied,maxrss" >> $output_file
336− $target_prog -l $MATCH \
337− | grep "^All" \
338− | while read -r name; \
339− do bench_exec_one "$name" "${GAUGE_ARGS[@]}" || exit 1; done \
340− || die "Benchmark execution failed."
341−}
342−
343−run_bench_target () {
344− local package_name=$1
345− local component=$2
346− local target_name=$3
347−
348− local target_prog
349− if test -z "$BENCHMARK_PACKAGE_VERSION"
350− then
351− echo "Please set BENCHMARK_PACKAGE_VERSION in bench_config"
352− exit 1
353− fi
354− target_prog=$(cabal_target_prog $package_name-$BENCHMARK_PACKAGE_VERSION $component $target_name) || \
355− die "Cannot find executable for target $target_name"
356−
357− echo "Running executable $target_name ..."
358−
359− # Needed by bench_exec_one
360− BENCH_EXEC_PATH=$target_prog
361−
362− local output_file=$(bench_output_file $target_name)
363− mkdir -p `dirname $output_file`
364− if test "$USE_GAUGE" -eq 0
365− then invoke_tasty_bench "$target_prog" "$target_name" "$output_file"
366− else invoke_gauge "$target_prog" "$target_name" "$output_file"
367− fi
368−}
369−
370−# $1: package name
371−# $2: component
372−# $3: targets
373−run_bench_targets() {
374− for i in $3
375− do
376− run_bench_target $1 $2 $i
377− done
378−}
379−
380−run_benches_comparing() {
381− local bench_list=$1
382−
383− if test -z "$CANDIDATE"
384− then
385− CANDIDATE=$(git rev-parse HEAD)
386− fi
387− if test -z "$BASE"
388− then
389− # XXX Should be where the current branch is forked from master
390− BASE="$CANDIDATE^"
391− fi
392− echo "Comparing baseline commit [$BASE] with candidate [$CANDIDATE]"
393− echo "Checking out base commit [$BASE] for benchmarking"
394− # XXX git checkout will overwrite this script itself and the scripts
395− # imported/used by this script.
396− git checkout "$BASE" || die "Checkout of base commit [$BASE] failed"
397−
398− # $BUILD_BENCH || die "build failed"
399− run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
400− run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
401−
402− echo "Checking out candidate commit [$CANDIDATE] for benchmarking"
403− git checkout "$CANDIDATE" || \
404− die "Checkout of candidate [$CANDIDATE] commit failed"
405−
406− # $BUILD_BENCH || die "build failed"
407− run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
408− run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
409− # XXX reset back to the original commit
410−}
411−
412−backup_output_file() {
413− local bench_name=$1
414− local output_file=$(bench_output_file $bench_name)
415−
416− if test -e $output_file -a "$APPEND" != 1
417− then
418− mv -f -v $output_file ${output_file}.prev
419− fi
420−}
421−
422−run_measurements() {
423− local bench_list=$1
424−
425− for i in $bench_list
426− do
427− backup_output_file $i
428− done
429−
430− if test "$COMMIT_COMPARE" = "0"
431− then
432− run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
433− run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
434− else
435− run_benches_comparing "$bench_list"
436− fi
437−}
438−
439−run_reports() {
440− local prog
441− prog=$BENCH_REPORT_DIR/bin/bench-report
442− test -x $prog || die "Cannot find bench-report executable"
443− test -z "$SILENT" && echo
444−
445− for i in $1
446− do
447− test -z "$SILENT" && echo "Generating reports for ${i}..."
448− $prog \
449− --benchmark $i \
450− $(test "$USE_GAUGE" = 1 && echo "--use-gauge") \
451− $(test "$GRAPH" = 1 && echo "--graphs") \
452− $(test "$SORT_BY_NAME" = 1 && echo "--sort-by-name") \
453− $(test -n "$BENCH_DIFF_STYLE" && echo "--diff-style $BENCH_DIFF_STYLE") \
454− $(test -n "$BENCH_CUTOFF_PERCENT" && echo "--diff-cutoff-percent $BENCH_CUTOFF_PERCENT") \
455− --fields "$FIELDS"
456− done
457−}
458−
459−#-----------------------------------------------------------------------------
460−# Execution starts here
461−#-----------------------------------------------------------------------------
462−
463−USE_GIT_CABAL=1 # This is used by set_common_vars
464−set_common_vars
465−
466−USE_NIX=0
467−COMPARE=0
468−COMMIT_COMPARE=0
469−BASE=
470−CANDIDATE=
471−
472−APPEND=0
473−LONG=0
474−RAW=0
475−SORT_BY_NAME=0
476−GRAPH=0
477−MEASURE=1
478−
479−GAUGE_ARGS=
480−BUILD_ONCE=0
481−
482−CABAL_BUILD_OPTIONS="--flag fusion-plugin --flag limit-build-mem"
483−
484−#-----------------------------------------------------------------------------
485−# Read command line
486−#-----------------------------------------------------------------------------
487−
488−while test -n "$1"
489−do
490− case $1 in
491− -h|--help|help) print_help ;;
492− # options with arguments
493− --benchmarks) shift; TARGETS=$1; shift ;;
494− --targets) shift; TARGETS=$1; shift ;;
495− --prefix) shift; BENCH_PREFIX="$1"; shift ;;
496− --fields) shift; FIELDS=$1; shift ;;
497− --base) shift; BASE=$1; shift ;;
498− --candidate) shift; CANDIDATE=$1; shift ;;
499− --with-compiler) shift; CABAL_WITH_COMPILER=$1; shift ;;
500− --cabal-build-flags) shift; CABAL_BUILD_OPTIONS+=" $1"; shift ;;
501− --cabal-build-options) shift; CABAL_BUILD_OPTIONS+=" $1"; shift ;;
502− --rtsopts) shift; RTS_OPTIONS=$1; shift ;;
503− --config) shift; BENCH_CONFIG_FILE=$1; shift ;;
504− --diff-style) shift; BENCH_DIFF_STYLE=$1; shift ;;
505− --diff-cutoff-percent) shift; BENCH_CUTOFF_PERCENT=$1; shift ;;
506− # flags
507− --slow) SLOW=1; shift ;;
508− --silent) SILENT=1; shift ;;
509− --quick) QUICK_MODE=1; shift ;;
510− --compare) COMPARE=1; shift ;;
511− --commit-compare) COMMIT_COMPARE=1; shift ;;
512− --raw) RAW=1; shift ;;
513− --append) APPEND=1; shift ;;
514− --long) LONG=1; shift ;;
515− --sort-by-name) SORT_BY_NAME=1; shift ;;
516− --graphs) GRAPH=1; shift ;;
517− --no-measure) MEASURE=0; shift ;;
518− # This is used in build-lib.sh to enable dev_build function which is used
519− # in targets.sh to enable or disable some targets.
520− --dev-build) RUNNING_DEVBUILD=1; shift ;;
521− --use-nix) USE_NIX=1; shift ;;
522− --use-gauge) USE_GAUGE=1; shift ;;
523− --) shift; break ;;
524− *) echo "Unknown flags: $*"; echo; print_help ;;
525− esac
526−done
527−GAUGE_ARGS=("$@")
528−
529−if test -z "$BENCH_CONFIG_FILE"
530−then
531− die "Please use --config to specify config file"
532−fi
533−
534−source "$BENCH_CONFIG_FILE" || \
535− die "Failed to source config file $BENCH_CONFIG_FILE"
536−
537−# Defined in $BENCH_CONFIG_FILE
538−bench_config
539−
540−if test -z "$FIELDS"
541−then
542− FIELDS=$DEFAULT_FIELDS
543−fi
544−
545−set_derived_vars
546−
547−#-----------------------------------------------------------------------------
548−# Determine targets
549−#-----------------------------------------------------------------------------
550−
551−only_real_benchmarks () {
552− for i in $TARGETS
553− do
554− local SKIP=0
555− for j in $COMPARISONS
556− do
557− if test $i == $j
558− then
559− SKIP=1
560− fi
561− done
562− if test "$SKIP" -eq 0
563− then
564− echo -n "$i "
565− fi
566− done
567−}
568−
569−# defined in $BENCH_CONFIG_FILE
570−bench_targets
571−
572−if test "$(has_item "$TARGETS" help)" = "help"
573−then
574− list_target_groups
575− list_comparisons
576− list_targets
577− exit
578−fi
579−
580−COMMON_FIELDS="allocated bytescopied cputime maxrss"
581−if test "$USE_GAUGE" -eq 1
582−then
583− ALL_FIELDS="$COMMON_FIELDS time cycles utime stime minflt majflt nvcsw nivcsw"
584−else
585− ALL_FIELDS="$COMMON_FIELDS"
586−fi
587−if test "$(has_item "$FIELDS" help)" = "help"
588−then
589− echo "Supported fields: $ALL_FIELDS"
590− echo "Default fields: $DEFAULT_FIELDS"
591− exit
592−fi
593−
594−if test "$LONG" -ne 0
595−then
596− if test -n "$TARGETS"
597− then
598− echo "Cannot specify benchmarks [$TARGETS] with --long"
599− exit
600− fi
601− TARGETS=$infinite_grp
602−fi
603−
604−DEFAULT_TARGETS="$(all_grp)"
605−TARGETS=$(set_targets)
606−
607−TARGETS_ORIG=$TARGETS
608−TARGETS=$(only_real_benchmarks)
609−
610−test -z "$SILENT" && echo "Using benchmark suites [$TARGETS]"
611−
612−#-----------------------------------------------------------------------------
613−# Build reporting utility
614−#-----------------------------------------------------------------------------
615−
616−# We need to build the report progs first at the current (latest) commit before
617−# checking out any other commit for benchmarking.
618−if test -z "$SILENT"
619−then build_report_progs
620−else silently build_report_progs
621−fi
622−
623−#-----------------------------------------------------------------------------
624−# Build and run targets
625−#-----------------------------------------------------------------------------
626−
627−if test "$USE_GAUGE" -eq 1
628−then
629− BUILD_FLAGS="--flag use-gauge"
630−fi
631−
632−BUILD_BENCH="$CABAL_EXECUTABLE v2-build $BUILD_FLAGS $CABAL_BUILD_OPTIONS --enable-benchmarks"
633−if test "$MEASURE" = "1"
634−then
635− run_measurements "$TARGETS"
636−fi
637−
638−#-----------------------------------------------------------------------------
639−# Run reports
640−#-----------------------------------------------------------------------------
641−
642−# $1: var name
643−build_comparison_results () {
644− local name
645− local constituents
646−
647− name=$1
648− constituents=$(eval "echo -n \$${name}")
649− mkdir -p "charts/$name"
650− dest_file="charts/$name/results.csv"
651− : > $dest_file
652− for j in $constituents
653− do
654− cat "charts/$j/results.csv" >> $dest_file
655− done
656−}
657−
658−if test "$COMPARE" -eq 1
659−then
660− DYN_CMP_GRP="$(echo "$TARGETS" | sed -e 's/ /_/g')_cmp"
661− eval "$DYN_CMP_GRP=\"$TARGETS\""
662− COMPARISON_REPORTS=$DYN_CMP_GRP
663− build_comparison_results $DYN_CMP_GRP
664−else
665− COMPARISON_REPORTS=""
666−fi
667−
668−for i in $COMPARISONS
669−do
670− if test "$(has_item "$TARGETS_ORIG" $i)" = $i
671− then
672− COMPARISON_REPORTS="$COMPARISON_REPORTS $i"
673− build_comparison_results $i
674− fi
675−done
676−
677−if test "$RAW" = "0"
678−then
679− run_reports "$TARGETS"
680− run_reports "$COMPARISON_REPORTS"
681− if test -n "$DYN_CMP_GRP"
682− then
683− rm -rf "charts/$DYN_CMP_GRP"
684− fi
685−fi