From 5001f8af1970b995c599081024827a76efa54d99 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 22 Mar 2013 21:20:13 +0000 Subject: [PATCH] benchmark: interactive plot git-svn-id: https://svn.dealii.org/trunk@28995 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/benchmarks/doplots.sh | 1 + tests/benchmarks/interactive.py | 145 ++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100755 tests/benchmarks/interactive.py diff --git a/tests/benchmarks/doplots.sh b/tests/benchmarks/doplots.sh index 5015d26954..7358c0456a 100755 --- a/tests/benchmarks/doplots.sh +++ b/tests/benchmarks/doplots.sh @@ -17,3 +17,4 @@ done gnuplot script rm -rf script convert -density 150 baseline.eps baseline.png +python interactive.py >index.html \ No newline at end of file diff --git a/tests/benchmarks/interactive.py b/tests/benchmarks/interactive.py new file mode 100755 index 0000000000..0ff0e7d3e1 --- /dev/null +++ b/tests/benchmarks/interactive.py @@ -0,0 +1,145 @@ +import textwrap +import os + +begin = \ +""" + + + + + Highcharts Example + + + + + + +
+ + + +deal.II performance benchmarks, see +http://www.dealii.org/testsuite.html
+ +
+ + + + + + + + + + + + + + +""" + + + +list = os.listdir(".") + +print begin + +first = 1 +for fname in list: + if (fname.startswith("names.")): + testname = fname[6:] + names = open(fname).readlines() + data = open("datatable."+testname).readlines() + idx = 0 + for name in names: + if first == 1: + first = 0 + else: + print "," + idx = idx+1 + print "{ name: '%s - %s', data: [" % (testname,name[:-1]) + i=0 +#((\$$col-$baseline)/$baseline*100.0) + baseline = -1 + for l in data: + if (len(l.strip())<1): + continue + + lnumbers = [float(x) for x in l.split()] + if len(lnumbers)<=1: + continue; + + if baseline<0: + baseline=lnumbers[idx] + + if lnumbers[0]==0: + continue; + + if (i==1): + print(","), + i=1; + + print "[%d,%f]" % (lnumbers[0], (lnumbers[idx]-baseline)/baseline*100.0) + print "]}\n" + + + + +print end \ No newline at end of file -- 2.39.5