Print some values for the paper
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Wed, 10 Jun 2009 15:15:39 +0100
changeset 4007 382bd8c05eaf
parent 4006 c52d82a14203
child 4008 89782e665678
Print some values for the paper
utils/flowmon/plot.py
--- a/utils/flowmon/plot.py	Mon Jun 08 17:39:13 2009 +0100
+++ b/utils/flowmon/plot.py	Wed Jun 10 15:15:39 2009 +0100
@@ -114,8 +114,8 @@
         results.read_results_file(fname)
     print "Read %i simulations." % (len(results.simulations),)
 
-    #performance_results(results)
-    histograms(results)
+    performance_results(results)
+    #histograms(results)
     #xml_file_size_results(results)
 
 
@@ -309,7 +309,6 @@
         num_nodes_list,
         [100*(mon.mean / nomon.mean - 1) for nomon, mon in zip(memory_no_monitor, memory_monitor)])
 
-
     pylab.subplot(224)
     pylab.grid(False)
     pylab.xlabel("Number of Nodes")
@@ -319,6 +318,17 @@
         num_nodes_list,
         [100*(mon.mean / nomon.mean - 1) for nomon, mon in zip(cpu_time_no_monitor, cpu_time_monitor)])
 
+
+
+    print "Memory overhead: %.2f%% for %i nodes" % ([100*(mon.mean / nomon.mean - 1) for nomon, mon in zip(memory_no_monitor, memory_monitor)][-1], num_nodes_list[-1])
+    print "Memory for %i nodes: %s bytes with monitor, %s bytes without monitor, difference=%s" \
+        % (num_nodes_list[-1], memory_monitor[-1].mean, memory_no_monitor[-1].mean,
+           (memory_monitor[-1].mean - memory_no_monitor[-1].mean))
+    print "CPU overhead: %.2f%% for %i nodes" % ([100*(mon.mean / nomon.mean - 1) for nomon, mon in zip(cpu_time_no_monitor, cpu_time_monitor)][-1], num_nodes_list[-1])
+    print "CPU time for %i nodes: %s sec. with monitor, %s sec. without monitor, difference=%s" \
+        % (num_nodes_list[-1], cpu_time_monitor[-1].mean, cpu_time_no_monitor[-1].mean,
+           (cpu_time_monitor[-1].mean - cpu_time_no_monitor[-1].mean))
+
     pylab.show()
 
 if __name__ == '__main__':