Output scaled throughput values to console

This commit is contained in:
kpdecker
2013-08-25 19:13:51 -05:00
parent 97fe2decc9
commit 28c4f4b9dd
+12
View File
@@ -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);
});
};