[gnome-shell] perf: fix bug in code to print out metrics



commit e375e1a8578da1e105fde9cc45ba3c630fb27240
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon May 19 19:26:41 2014 -0400

    perf: fix bug in code to print out metrics
    
    We don't normally hit the code in scripting.js to print metrics
    because shell-perf-tool bypasses it, but there was a left-over
    in the code that no longer works. Also add in the units to the
    output.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732349

 js/ui/scripting.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/scripting.js b/js/ui/scripting.js
index 72f6702..f952ed0 100644
--- a/js/ui/scripting.js
+++ b/js/ui/scripting.js
@@ -306,8 +306,8 @@ function _collect(scriptModule, outputFile) {
         print ('------------------------------------------------------------');
         for (let i = 0; i < metrics.length; i++) {
             let metric = metrics[i];
-            print ('# ' + scriptModule.METRIC_DESCRIPTIONS[metric]);
-            print (metric + ': ' +  scriptModule.METRICS[metric]);
+            print ('# ' + scriptModule.METRICS[metric].description);
+            print (metric + ': ' +  scriptModule.METRICS[metric].value + scriptModule.METRICS[metric].units);
         }
         print ('------------------------------------------------------------');
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]