diff --git a/bench/throughput.js b/bench/throughput.js index 4865e5a6..67c2290b 100644 --- a/bench/throughput.js +++ b/bench/throughput.js @@ -135,6 +135,18 @@ module.exports = function(grunt, callback) { }); warmer.bench(function() { + grunt.log.writeln(); // Clear out any trailing contnet + + var scaled = {}; + _.each(warmer.times, function(times, name) { + var output = scaled[name] = {}; + + _.each(times, function(time, lang) { + output[lang] = ((time - warmer.minimum) / (warmer.maximum - warmer.minimum) * 100).toFixed(2); + }); + }); + grunt.log.writeln('Scaled throughput: ' + JSON.stringify(scaled, undefined, 2)); + callback && callback(warmer.times); }); };