[rhmessaging-commits] rhmessaging commits: r3400 - mgmt/trunk/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu May 28 11:56:25 EDT 2009


Author: eallen
Date: 2009-05-28 11:56:24 -0400 (Thu, 28 May 2009)
New Revision: 3400

Modified:
   mgmt/trunk/cumin/python/cumin/charts.py
   mgmt/trunk/cumin/python/cumin/stat.py
Log:
Remove the 'Standard Devation' from the legend

Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py	2009-05-28 15:41:37 UTC (rev 3399)
+++ mgmt/trunk/cumin/python/cumin/charts.py	2009-05-28 15:56:24 UTC (rev 3400)
@@ -223,16 +223,8 @@
             cr.stroke()
 
             cr.set_source_rgb(*color)
-            if title == "Standard Deviation":
-                cr.move_to(8, y-8)
-                cr.line_to(16, y-8)
-                cr.move_to(12, y-8)
-                cr.line_to(12, y)
-                cr.move_to(8, y)
-                cr.line_to(16, y)
-            else:
-                cr.rectangle(8, y, 8, -8)
-                cr.fill()
+            cr.rectangle(8, y, 8, -8)
+            cr.fill()
             cr.stroke()
 
             cr.move_to(20, y)

Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py	2009-05-28 15:41:37 UTC (rev 3399)
+++ mgmt/trunk/cumin/python/cumin/stat.py	2009-05-28 15:56:24 UTC (rev 3400)
@@ -443,25 +443,7 @@
             method = self.method.get(session)
             for stat in stats:
                 samples[stat] = stat.samples(object, duration, interval, method)
-        """
-        for stat in stats:
-            values[stat] = [x[1] for x in samples[stat]]
 
-        max_value = 1
-        min_value = 0
-
-        for stat in stats:
-            vals = values[stat]
-            if vals:
-                max_value = max(nvl(max(vals), 0), max_value)
-                min_value = min(nvl(min(vals), 0), min_value)
-
-        max_value = round(max_value * 1.1 + 1)
-
-        if min_value < 0:
-            min_value = round(min_value * 1.1 - 1)
-        """
-        
         # take stddev into account for max and min y values
         deviated_values = [(nvl(x[1],0) + float(nvl(x[2],0))/2, 
                             nvl(x[1],0) - float(nvl(x[2],0))/2) 
@@ -509,13 +491,6 @@
         else:
             titles = [x.title for x in stats]
 
-            stds = [x[2] for x in samples[stat] if x[2] is not None and int(x[2]) is not 0 for stat in stats]
-            if len(stds):
-                clrs = list(colors)
-                clrs[len(titles)] = (0,0,0)
-                colors = tuple(clrs)
-                titles.append("Standard Deviation")
-
         chart.plot_legend(titles, colors)
 
         self.cache_it(session, chart, recent)




More information about the rhmessaging-commits mailing list