summaryrefslogtreecommitdiff
path: root/tko
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-08-11 19:10:02 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-08-11 19:10:02 +0000
commit56476d435bcd8493c783e21f0406c29713adabc5 (patch)
treeb028d50ce11941ef6a3708f6320931af21c54423 /tko
parent71b8055a3a71cb7c4dc2b91f56e64bd3c3ff7624 (diff)
Delete stale benchmark graphs.
Signed-off-by: Duane Sand <duanes@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3523 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko')
-rw-r--r--tko/perf_graph.cgi97
-rw-r--r--tko/perf_graphs.cgi56
2 files changed, 0 insertions, 153 deletions
diff --git a/tko/perf_graph.cgi b/tko/perf_graph.cgi
deleted file mode 100644
index 3233386a..00000000
--- a/tko/perf_graph.cgi
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-# perf_graph.cgi: generate image of one graph of a benchmark's performance
-
-__author__ = """duanes@google.com (Duane Sand), Copyright Google 2008"""
-
-import cgi, cgitb
-import common
-from autotest_lib.tko import perf, plotgraph
-
-
-def get_cgi_args():
- cgitb.enable()
- form = cgi.FieldStorage(keep_blank_values=True)
-
- benchmark = form.getvalue('test', '')
- # required test=testname (untagged runs only)
- # or test=testname.sometags
- # or test=testname* (combines all tags except .twoway)
- # or test=testname.twoway* (combines twoway tags)
- # e.g. test=dbench
-
- metric = form.getvalue('metric', '')
- # optional metric=attributename (from testname.tag/results/keyval)
- # or metric=1/attributename
- # or metric=geo_mean (combines all attributes)
- # or metric=good_testrun_count (tally of runs)
- # or metric=$testattrname (from testname.tag/keyval)
- # e.g. metric=throughput
- # metric=$stale_page_age
- # metric=$version (show test's version #)
- # defaults to test's main performance attribute, if known
-
- one_user = form.getvalue('user', '')
- # optional user=linuxuserid
- # restrict results just to testrun jobs submitted by that user
- # defaults to all users
-
- selected_platforms = form.getvalue('platforms', '')
- # optional platforms=plat1,plat2,plat3...
- # where platN is xyz (combines all xyz_variants as one plotline)
- # or xyz$ (plots each xyz_variant separately)
- # restrict results just to selected types of test machines
- # defaults to commonly used types, combining variants
-
- selected_machines = form.getvalue('machines', '')
- # optional machines=mname1,mname2,mname3...
- # or machines=mnam* (single set of similar host names)
- # or machines=yings (abbrev for ying's benchmarking machines)
- # where mnameN is network hostname of a test machine, eg bdcz12
- # restricts results just to selected test machines
- # defaults to all machines of selected platform types
-
- graph_size = form.getvalue('size', '640,500' )
- # optional size=width,height (in pixels)
-
- dark = form.has_key('dark')
-
- test_attributes = perf.parse_test_attr_args(form)
- # see variations listed in perf.py
-
- if not benchmark:
- benchmark = 'dbench*' # for cgi testing convenience
- if not metric:
- # strip tags .eth0 etc and * wildcard from benchmark name
- bname = benchmark.split('.',1)[0].rstrip('*')
- metric = perf.benchmark_main_metric(bname)
- assert metric, "no default metric for test %s" % bname
- return (benchmark, metric, selected_platforms,
- selected_machines, one_user, graph_size, dark, test_attributes)
-
-
-def one_performance_graph():
- # generate image of graph of one benchmark's performance over
- # most kernels (X axis) and all machines (one plotted line per type)
- perf.init()
- (benchmark, metric, selected_platforms, selected_machines,
- one_user, graph_size, dark, test_attributes) = get_cgi_args()
- kernels = perf.kernels()
- kernels.get_all_kernel_names()
- machine_to_platform, platforms_order = perf.get_platform_info(
- selected_platforms, selected_machines)
- selected_jobs = perf.select_jobs(one_user, machine_to_platform)
- possible_tests = perf.identify_relevent_tests(
- benchmark, selected_jobs,
- kernels, machine_to_platform)
- data = perf.collect_test_results(possible_tests, kernels,
- metric, test_attributes)
- title = benchmark.capitalize() + " Performance"
- graph = plotgraph.gnuplot(title, 'Kernels', metric.capitalize(),
- xsort=perf.sort_kernels, size=graph_size)
- for platform in platforms_order:
- if platform in data:
- graph.add_dataset(platform, data[platform])
- graph.plot(cgi_header=True, dark=dark)
-
-
-one_performance_graph()
diff --git a/tko/perf_graphs.cgi b/tko/perf_graphs.cgi
deleted file mode 100644
index 70a8f368..00000000
--- a/tko/perf_graphs.cgi
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-# perf_graphs.cgi: generate web page showing multiple graphs of benchmarks' performance
-
-import cgi, cgitb
-import common
-from autotest_lib.tko import perf
-
-
-def multiple_graphs_page(benchmarks):
- # Generate html for web page showing graphs for all benchmarks
- # Each graph image is formed by an invocation of 2nd cgi file
- print "Content-Type: text/html\n"
- print "<html><body bgcolor='#001c38' text='#b0d8f0'>"
- print "<h3><center> Kernel Benchmarks",
- if one_user:
- print "By User", one_user,
- if machine_names:
- print "On Selected",
- else:
- print "On All ",
- print "Machines </center></h3>"
-
- for bench in benchmarks:
- args = ['test=%s*' % bench, 'dark']
- if one_user:
- args.append('user=%s' % one_user)
- if graph_size:
- args.append('size=%s' % graph_size)
- if platforms:
- args.append('platforms=%s' % platforms)
- if machine_names:
- args.append('machines=%s' % machine_names)
- perf.append_cgi_args(args, test_attributes)
- print "<img src='perf_graph.cgi?%s'" % '&'.join(args),
- print " vspace=5 hspace=5>"
-
- if one_user != 'yinghan':
- print "<p> Uncontrolled results!"
- print "Not using just the controlled benchmarking machines."
- print "Variants of a platform type (mem size, # disks, etc) may be"
- print "lumped together."
- print "Non-default test args may have been applied in some cases."
- print "No-container cases and whole-machine single-container cases"
- print "are lumped together."
- print "</body></html>"
-
-
-cgitb.enable()
-form = cgi.FieldStorage()
-platforms = form.getvalue('platforms', '')
-machine_names = form.getvalue('machines', '')
-one_user = form.getvalue('user', '')
-graph_size = form.getvalue('size', '')
-test_attributes = perf.parse_test_attr_args(form)
-benchmarks = perf.usual_benchmarks
-multiple_graphs_page(benchmarks)