[mlpack-svn] r15819 - in mlpack/conf/jenkins-conf/benchmark: benchmark util

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Sep 20 12:27:22 EDT 2013


Author: marcus
Date: Fri Sep 20 12:27:22 2013
New Revision: 15819

Log:
Fix round corners bug that occurs when the percentage value is 100% or 0%.

Modified:
   mlpack/conf/jenkins-conf/benchmark/benchmark/make_reports.py
   mlpack/conf/jenkins-conf/benchmark/util/template.py

Modified: mlpack/conf/jenkins-conf/benchmark/benchmark/make_reports.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/benchmark/make_reports.py	(original)
+++ mlpack/conf/jenkins-conf/benchmark/benchmark/make_reports.py	Fri Sep 20 12:27:22 2013
@@ -306,10 +306,20 @@
     if numDatasets != 0:
       negative = (((datasetCount - bestLibCount) / float(datasetCount)) * 100.0)
       reportValues["progressPositive"] = "{0:.2f}".format(100 - negative) + "%"
-      reportValues["progressNegative"] = "{0:.2f}".format(negative) + "%"
+
+      if negative == 0:
+        reportValues["progressPositiveStyle"] = "{0:.2f}".format(100 - negative) + progressBarStyle
+      else:
+        reportValues["progressPositiveStyle"] = "{0:.2f}".format(100 - negative) + "%;"
+
+      if negative == 100:
+        reportValues["progressNegativeStyle"] = "{0:.2f}".format(negative) + progressBarStyle
+      else:
+        reportValues["progressNegativeStyle"] = "{0:.2f}".format(negative) + "%;"
     else:
       reportValues["progressPositive"] = "0%"
-      reportValues["progressNegative"] = "100%"
+      reportValues["progressPositiveStyle"] = "0%;"
+      reportValues["progressNegativeStyle"] = "100%" + progressBarStyle
     
     reportValues["numLibararies"] = libCount
     reportValues["numDatasets"] = datasetCount

Modified: mlpack/conf/jenkins-conf/benchmark/util/template.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/util/template.py	(original)
+++ mlpack/conf/jenkins-conf/benchmark/util/template.py	Fri Sep 20 12:27:22 2013
@@ -57,8 +57,8 @@
 <p class="graph--name">%(methodName)s</p>
 <div class="holder--progressBar">
 <span class="progressBar__percentage">%(progressPositive)s</span>
-<span class="progressBar__firstPart" style="width:%(progressPositive)s;"></span>
-<span class="progressBar__secondPart" style="width:%(progressNegative)s;"></span>
+<span class="progressBar__firstPart" style="width:%(progressPositiveStyle)s"></span>
+<span class="progressBar__secondPart" style="width:%(progressNegativeStyle)s"></span>
 </div><div class="btn-group">
 <a href="#collapse%(groupOne)s" class="btn graphs btn-grey icon-bars js-button"></a>
 <a href="#collapse%(groupTwo)s" class="btn info btn-grey icon-info js-button"></a>
@@ -124,4 +124,6 @@
 <thead><tr><th></th>%(timingHeader)s</tr></thead>
 <tbody>%(timingTable)s</tbody>
 </table></div></div></div>
-"""
\ No newline at end of file
+"""
+
+progressBarStyle = "%;-webkit-border-radius:4px 4px 4px 4px;-moz-border-radius:4px 4px 4px 4px;border-radius:4px 4px 4px 4px;"



More information about the mlpack-svn mailing list