[ARVADOS] updated: 7ab6b64c5fa3b958752ecb22751630b6e1016bd1

git at public.curoverse.com git at public.curoverse.com
Wed Nov 26 13:40:15 EST 2014


Summary of changes:
 apps/workbench/app/assets/javascripts/event_log.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

       via  7ab6b64c5fa3b958752ecb22751630b6e1016bd1 (commit)
      from  64756c0a3ef66cb37969f2bb594a56fb1a5ab40c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 7ab6b64c5fa3b958752ecb22751630b6e1016bd1
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Wed Nov 26 19:40:00 2014 +0100

    4233: only divide CPU usage by number of CPUs when total CPU usage is less than the measured interval time

diff --git a/apps/workbench/app/assets/javascripts/event_log.js b/apps/workbench/app/assets/javascripts/event_log.js
index 65e4732..e2ec249 100644
--- a/apps/workbench/app/assets/javascripts/event_log.js
+++ b/apps/workbench/app/assets/javascripts/event_log.js
@@ -102,10 +102,12 @@ function processLogLineForChart( logLine ) {
 
                 // special calculation for cpus
                 if( /-cpu$/.test(series) ) {
-                    // divide the stat by the number of cpus
-                    var cpuCountMatch = intervalMatch[1].match(/(\d+) cpus/);
-                    if( cpuCountMatch ) {
-                        datum = datum / cpuCountMatch[1];
+                    // divide the stat by the number of cpus unless the time count is less than the interval length
+                    if( dsum > dt ) {
+                        var cpuCountMatch = intervalMatch[1].match(/(\d+) cpus/);
+                        if( cpuCountMatch ) {
+                            datum = datum / cpuCountMatch[1];
+                        }
                     }
                 }
 
@@ -192,7 +194,7 @@ function addJobGraphDatum(timestamp, datum, series, rawDetailData) {
             shifted.push(jobGraphData.shift());
         }
         if( shifted.length > 0 ) {
-            // from those that we dropped, are any of them maxima? if so we need to rescale
+            // from those that we dropped, were any of them maxima? if so we need to rescale
             jobGraphSeries.forEach( function(series) {
                 // test that every shifted entry in this series was either not a number (in which case we don't care)
                 // or else approximately (to 2 decimal places) smaller than the scaled maximum (i.e. 1),

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list