[perf] Include trace comparison in html output

This commit is contained in:
Chris Wilson 2009-07-20 22:19:21 +01:00
parent f30cee70f5
commit 2dd97ae59c
4 changed files with 11 additions and 13 deletions

View file

@ -17,6 +17,8 @@ genlcov:
< cairo-lcov.info > cairo-lcov.info.tmp
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory cairo-lcov --title "Cairo Code Coverage" --show-details cairo-lcov.info.tmp
$(RM) cairo-lcov.info.tmp
html-local: lcov
else
lcov lcov-perf genlcov:
@echo You need to configure Cairo with support for gcov enabled.

View file

@ -141,7 +141,7 @@ perf: cairo-perf$(EXEEXT) cairo-perf-trace$(EXEEXT)
html-local: index.html
index.html: cairo-perf$(EXEEXT)
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -t -h HEAD > $@
EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)

View file

@ -52,12 +52,14 @@ END
exit 1
}
benchmarks="cairo-perf"
# First, pull off any known options
while true; do
case $1 in
-f|--force) force_cairo_perf="true";;
-h|--html) html_output="true";;
-t|--trace) use_traces="true";;
-t|--trace) benchmarks="${benchmarks} cairo-perf-trace";;
*) break;;
esac
@ -212,15 +214,10 @@ run_cairo_perf_if_not_cached() {
build $build_dir $sha || exit 1
}
if [ "$use_traces" = "true" ]; then
cmd="cairo-perf-trace"
else
cmd="cairo-perf"
fi
echo "Running \"$cmd $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:"
echo "$perf"
pwd
(./$cmd $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed") >> $perf
echo "Running \"cairo-perf $CAIRO_PERF_OPTIONS\" against $rev. Results will be cached in:"
for cmd in $benchmarks; do
(./$cmd $CAIRO_PERF_OPTIONS || echo "*** Performance test crashed") >> $perf
done
cd $owd
}

View file

@ -27,6 +27,7 @@ print '''\
<html><head>
<title>Performance Changes</title>
<style type="text/css">/*<![CDATA[*/
body { background: white; color: black; }
table { border-collapse: collapse; }
th, td { border: 1px solid silver; padding: 0.2em; }
@ -85,5 +86,3 @@ for target, names in targets:
print '</tbody></table>'
print '</body></html>'