|
From: <mm...@us...> - 2012-12-04 18:12:43
|
Revision: 3306
http://dmcs.svn.sourceforge.net/dmcs/?rev=3306&view=rev
Author: mmsc
Date: 2012-12-04 18:12:29 +0000 (Tue, 04 Dec 2012)
Log Message:
-----------
Update table script.
Modified Paths:
--------------
dmcs/branches/dmcs1.5/examples/test/tables.py
dmcs/branches/dmcs1.5/examples/test/templates/tex_header.tpl
dmcs/branches/dmcs1.5/examples/test/templates/tex_row.tpl
Modified: dmcs/branches/dmcs1.5/examples/test/tables.py
===================================================================
--- dmcs/branches/dmcs1.5/examples/test/tables.py 2012-12-04 15:53:28 UTC (rev 3305)
+++ dmcs/branches/dmcs1.5/examples/test/tables.py 2012-12-04 18:12:29 UTC (rev 3306)
@@ -132,10 +132,14 @@
def complete_test_case(dirname, subdirs):
+ print "Check dir = " + dirname
+ print "subdirs = "
+ print subdirs
if os.path.exists(dirname) == False:
return False
for subdir in subdirs:
+ print "Check subdir = " + subdir
if os.path.exists(dirname + subdir) == False:
return False
@@ -169,14 +173,21 @@
def process_test_cases(toponame, testpacks, current_test_case):
- outcomes = [ ]
+ outcomes = []
sorted_testcases = []
test_runs = []
for p in testpacks:
+ if (p != 'all') and (p != '1'):
+ test_runs.append('/noloop_' + p)
test_runs.append('/' + p)
+
+ if (p != 'all') and (p != '1'):
+ test_runs.append('/opt_noloop_' + p)
test_runs.append('/opt_' + p)
+ print test_runs
+
for instance in current_test_case:
dirname = 'output/' + toponame + '/' + toponame + '-' + instance[1] + '-' + instance[2] + '-' + instance[3] + '-' + instance[4] + '-' + instance[5]
if complete_test_case(dirname, test_runs):
@@ -185,6 +196,8 @@
outcome.append(get_outcome(toponame, dirname + r))
ordered_push(outcomes, outcome, sorted_testcases, instance)
+ else:
+ print "directory not complete for toponame = " + toponame
return outcomes, sorted_testcases
@@ -208,7 +221,19 @@
else:
return time
+def combined_display(time, val):
+ if time == '1000124':
+ return '(' + val + ')'
+ elif time == '10001':
+ return 'E'
+ else:
+ blank_count = 4 - len(val)
+ blanks = ''
+ for i in range(blank_count):
+ blanks = blanks + '\ '
+ return time + blanks + '(' + val + ')'
+
def build_row(tex_output, tex_row_template,
outcomes, sorted_testcases,
topo, topo_abbr):
@@ -237,10 +262,18 @@
final_display(outcome[1][1]),
nice_display(outcome[2][0], outcome[2][1]),
nice_display(outcome[3][0], outcome[3][1]),
- nice_display(outcome[4][0], outcome[4][1]),
+ final_display(outcome[4][0]),
+ outcome[4][1],
nice_display(outcome[5][0], outcome[5][1]),
- nice_display(outcome[6][0], outcome[6][1]),
- nice_display(outcome[7][0], outcome[7][1])))
+ final_display(outcome[6][0]),
+ outcome[6][1],
+ nice_display(outcome[7][0], outcome[7][1]),
+ final_display(outcome[8][0]),
+ outcome[8][1],
+ nice_display(outcome[9][0], outcome[9][1]),
+ final_display(outcome[10][0]),
+ outcome[10][1],
+ nice_display(outcome[11][0], outcome[11][1])))
def main(argv):
@@ -255,12 +288,12 @@
topo_abbreviation = {'diamond' : 'D', 'ring' : 'R', 'tree' : 'T', 'zigzag' : 'Z'}
#topologies = ['diamond', 'ring', 'tree', 'zigzag']
- topologies = ['diamond']
+ topologies = ['ring']
testpacks = ['all', '1', '10', '100' ]
- subdirs = ['', '/all', '/opt_all', '/1', '/opt_1', '/10', '/opt_10', '/100', '/opt_100']
+ subdirs = ['', '/all', '/opt_all', '/1', '/opt_1', '/10', '/noloop_10', '/opt_10', '/opt_noloop_10', '/100', '/noloop_100', '/opt_100', '/opt_noloop_100']
for topo in topologies:
- filename = 'config/' + topo + '.cfg'
+ filename = 'config/' + topo + '.out'
with open(filename, 'r') as config_file:
line = config_file.readline()
line = line[:len(line)-1]
Modified: dmcs/branches/dmcs1.5/examples/test/templates/tex_header.tpl
===================================================================
--- dmcs/branches/dmcs1.5/examples/test/templates/tex_header.tpl 2012-12-04 15:53:28 UTC (rev 3305)
+++ dmcs/branches/dmcs1.5/examples/test/templates/tex_header.tpl 2012-12-04 18:12:29 UTC (rev 3306)
@@ -1,23 +1,35 @@
\begin{table}[t]
-\footnotesize
+\scriptsize
\centering
-\begin{tabular}{@{~}lr@{~~~~~~}r@{~~~~~~}r@{~~~~~~~}r@{~~~~~~}r@{~~~~~~}r@{~~~~~~}r@{~~~~~~~}r@{~~~~~~}r@{~~~~~~}r@{~}}
+\begin{tabular}{@{~}lr@{~~~~~}r@{~~~~}r@{~~~~~}r@{~~~~}r@{~~~~}r@{~~~~}r@{~~~~}rr@{~~~~}rr@{~~~~}r@{~~~~}rr@{~~~~}r@{~~~~}rr@{~~~~}r@{~}}
\toprule %\\[-7pt]
\rule{0pt}{10pt} \\[-1.2em]
\multicolumn{1}{l}{\textbf{Topo / Parameter}~~~} &
\multicolumn{2}{c}{\textbf{$\DMCS$}} &
\multicolumn{2}{c}{\textbf{$\DMCSOPT$}} &
-\multicolumn{6}{c}{\textbf{$\DMCSSTREAMING$}}\\[0.2em]
+\multicolumn{14}{c}{\textbf{$\DMCSSTREAMING$}}\\[0.2em]
-\cline{2-11}\\[-0.8em]
+\cline{2-19}\\[-0.8em]
& time & \# & time & \# &
\multicolumn{2}{c}{$k=1$} &
-\multicolumn{2}{c}{$k=10$} &
-\multicolumn{2}{c}{$k=100$} \\
+\multicolumn{6}{c}{$k=10$} &
+\multicolumn{6}{c}{$k=100$} \\
-\cline{6-11}\\[-0.8em]
+\cline{6-19}\\[-0.8em]
-& & & & & ORIG & OPT & ORIG & OPT & ORIG & OPT \\
+& & & & & ORIG & OPT &
+\multicolumn{3}{c}{ORIG} &
+\multicolumn{3}{c}{OPT} &
+\multicolumn{3}{c}{ORIG} &
+\multicolumn{3}{c}{OPT} \\
-\midrule
\ No newline at end of file
+\cline{8-19}\\[-0.8em]
+
+& & & & & & &
+1st & \# & All &
+1st & \# & All &
+1st & \# & All &
+1st & \# & All \\
+
+\midrule\rule{0pt}{1pt} \\[-0.9em]\rule{0pt}{1pt} \\[-0.9em]
\ No newline at end of file
Modified: dmcs/branches/dmcs1.5/examples/test/templates/tex_row.tpl
===================================================================
--- dmcs/branches/dmcs1.5/examples/test/templates/tex_row.tpl 2012-12-04 15:53:28 UTC (rev 3305)
+++ dmcs/branches/dmcs1.5/examples/test/templates/tex_row.tpl 2012-12-04 18:12:29 UTC (rev 3306)
@@ -1,2 +1,2 @@
%{0}
-${1}_{2} ~/~ ({3},{4},{5},{6})$ & {7} & {8} & {9} & {10} & {11} & {12} & {13} & {14} & {15} & {16}\\
+${1}_{2} ~/~ ({3},{4},{5},{6})$ & {7} & {8} & {9} & {10} & {11} & {12} & {13} & {14} & {15} & {16} & {17} & {18} & {19} & {20} & {21} & {22} & {23} & {24}\\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|