diff --git a/web/processing/gen-details-page.py b/web/processing/gen-details-page.py
index 567c1c5..fad82e5 100644
--- a/web/processing/gen-details-page.py
+++ b/web/processing/gen-details-page.py
@@ -62,17 +62,23 @@
os_string = "unknown"
for line in open(data_dir + "/logs/uname").readlines():
fields = line.split()
- os = fields[0]
+ os_id = fields[0]
ver = fields[1]
arch = fields[2]
- os_string = "%s %s, %s" % (os, ver, arch)
+ os_string = "%s %s, %s" % (os_id, ver, arch)
# Generate latency graphs
-l = os.listdir(results_dir + "/lat")
-for lat_file in l:
- print lat_file
- argv = ["python", "plot_lat.py", results_dir + "/lat/" + lat_file, lat_file]
- subprocess.check_call(argv)
+lat_ls = None
+try:
+ lat_ls = os.listdir(results_dir + "/lat")
+ for lat_file in lat_ls:
+ if not re.search("\.csv", lat_file):
+ continue
+ argv = ["python", "plot_lat.py", results_dir + "/lat/" + lat_file, \
+ lat_file, data_dir + "/graphs", str(len(processor_ids))]
+ subprocess.check_call(argv)
+except:
+ pass
# Generate throughput graphs
argv = ["python", "plot_thr.py", results_dir, target_cpus, "0"]
@@ -98,8 +104,26 @@
out_html = out_html + html
# Generate latency heatmap section
-html = "
Latency To be added.
"
+html = "Latency "
+html = html + "These graphs show the pairwise IPC latency between cores."
+html = html + "
"
+thr_graphs_links = ""
+i = 0
+graphs_per_row = 3
+if lat_ls is None:
+ html = html + "No data. "
+else:
+ for t in lat_ls:
+ if not re.search("\.csv", t):
+ continue
+ graph_file = "../graphs/%s/lat_%s.png" % (name, t)
+ if i % graphs_per_row == 0:
+ html = html + " "
+ html = html + " " \
+ % (graph_file, graph_file)
+ i = i + 1
+html = html + "
"
out_html = out_html + html
# Generate throughput graphs section
diff --git a/web/processing/plot_lat.py b/web/processing/plot_lat.py
index 829e0f3..1dc4128 100644
--- a/web/processing/plot_lat.py
+++ b/web/processing/plot_lat.py
@@ -6,7 +6,7 @@
import numpy.random
import matplotlib.pyplot as plt
import matplotlib.cm as cm
-import pylab
+import pylab as pyl
def get_data(filename):
data = np.loadtxt(filename)
@@ -30,19 +30,24 @@ def get_data(filename):
# Handle command line args
if len(sys.argv) < 2:
- print "usage: python plot_lat.py [fix-scale]"
+ print "usage: python plot_lat.py [fix-scale]"
sys.exit(0)
input_file = sys.argv[1]
fix_scale = 0
-if len(sys.argv) > 3:
- fix_scale = int(sys.argv[3])
+if len(sys.argv) > 5:
+ fix_scale = int(sys.argv[5])
+
+num_cores = int(sys.argv[4])
+
+output_dir = sys.argv[3]
raw_data = np.loadtxt(input_file)
data = get_data(input_file)
-fig = plt.figure(figsize=(4,3))
+fig = plt.figure(figsize=(3,2))
+pyl.rc('font', size='8.0')
#f = pylab.Figure(figsize=(2,1.5))
# print ds
#heatmap, xedges, yedges = np.histogram2d(data[0], data[1], bins=48, weights=data[2])
@@ -61,13 +66,13 @@ def get_data(filename):
# add some
plt.ylabel('Core ID')
-plt.ylim(0, 48)
+plt.ylim(-0.5, int(sys.argv[4])-0.5)
plt.xlabel('Core ID')
-plt.xlim(0, 48)
+plt.xlim(-0.5, int(sys.argv[4])-0.5)
plt.title(sys.argv[2])
cb = plt.colorbar(shrink=1.0, format='%.3e')
cb.set_label('Latency in microseconds')
#plt.savefig("lat_" + sys.argv[1] + ".pdf", format="pdf", bbox_inches='tight')
-plt.savefig(out_dir + "/lat_" + sys.argv[1] + ".png", format="png", bbox_inches='tight')
+plt.savefig(output_dir + "/lat_" + sys.argv[2] + ".png", format="png", bbox_inches='tight')