Permalink
Browse files

Add some stats to performance in Safari

  • Loading branch information...
koenbok committed Sep 26, 2014
1 parent 9a04efe commit bd01fd823d4f017b7aece8a535de197fdb0ac640
Showing with 60 additions and 8 deletions.
  1. +7 −3 Makefile
  2. +17 −0 framer/Utils.coffee
  3. +16 −1 perf/init.coffee
  4. +20 −4 perf/init.js
View
@@ -60,11 +60,15 @@ safariw:
perf:
$(browserify) perf/init.coffee -o perf/init.js
$(bin)/phantomjs perf/runner.js perf/index.html
perf%watch:
perf%watch:
perfw:
$(watch) make perf
perf-safari:
$(browserify) perf/init.coffee -o perf/init.js
open -g -a Safari perf/index.html
perf-safariw:
$(watch) make perf-safari
# Building and uploading the site
View
@@ -49,6 +49,23 @@ Utils.arrayPrev = (arr, item) ->
arr[arr.indexOf(item) - 1] or _.last arr
######################################################
# MATH
Utils.sum = (arr) -> _.reduce arr, (a, b) -> a + b
Utils.average = (arr) -> Utils.sum(arr) / arr.length
Utils.mean = Utils.average
Utils.median = (x) ->
return null if x.length is 0
sorted = x.slice().sort (a, b) ->
a - b
if sorted.length % 2 is 1
sorted[(sorted.length - 1) / 2]
else
(sorted[(sorted.length / 2) - 1] + sorted[sorted.length / 2]) / 2
######################################################
# ANIMATION
View
@@ -79,6 +79,8 @@ Utils.domComplete ->
c = 0
allResults = []
minFPS = 50
tooSlow = 0
tooSlowMax = 2
@@ -87,6 +89,8 @@ Utils.domComplete ->
if results
allResults.push(results)
output = "#{c} - #{results.layers}"
output += "\tBuild: #{Utils.round(results.buildTotal, 0)}ms /#{Utils.round(results.buildLayer, 2)}ms"
output += "\tFPS: #{Utils.round(results.fps.fps, 1)}"
@@ -96,10 +100,21 @@ Utils.domComplete ->
if results.fps.fps < minFPS
tooSlow++
if c < 100 and tooSlow < tooSlowMax
# if c < 100 and tooSlow < tooSlowMax
if c < 30 and tooSlow < tooSlowMax
c++
run {n: c * 20}, callback
else
buildTotal = Utils.round(Utils.average(_.map(allResults, (i) -> i.buildLayer)), 3) * 1000
layerTotal = Utils.round(Utils.average(_.map(allResults, (i) -> i.fps.fps / i.layers)), 3) * 1000
print "#{buildTotal} (build)"
print "#{layerTotal} (layer)"
print "BUILD LOOKS SLOW > 440" if buildTotal > 440
print "LAYER LOOKS SLOW > 760" if layerTotal > 760
window.phantomComplete = true
callback()
View
@@ -103,14 +103,16 @@ _run = function(options, callback) {
};
Utils.domComplete(function() {
var c, callback, minFPS, tooSlow, tooSlowMax;
var allResults, c, callback, minFPS, tooSlow, tooSlowMax;
c = 0;
allResults = [];
minFPS = 50;
tooSlow = 0;
tooSlowMax = 2;
callback = function(results) {
var output;
var buildTotal, layerTotal, output;
if (results) {
allResults.push(results);
output = "" + c + " - " + results.layers;
output += "\tBuild: " + (Utils.round(results.buildTotal, 0)) + "ms /" + (Utils.round(results.buildLayer, 2)) + "ms";
output += "\tFPS: " + (Utils.round(results.fps.fps, 1));
@@ -119,12 +121,26 @@ Utils.domComplete(function() {
tooSlow++;
}
}
if (c < 100 && tooSlow < tooSlowMax) {
if (c < 30 && tooSlow < tooSlowMax) {
c++;
return run({
n: c * 20
}, callback);
} else {
buildTotal = Utils.round(Utils.average(_.map(allResults, function(i) {
return i.buildLayer;
})), 3) * 1000;
layerTotal = Utils.round(Utils.average(_.map(allResults, function(i) {
return i.fps.fps / i.layers;
})), 3) * 1000;
print("" + buildTotal + " (build)");
print("" + layerTotal + " (layer)");
if (buildTotal > 440) {
print("BUILD LOOKS SLOW > 440");
}
if (layerTotal > 760) {
print("LAYER LOOKS SLOW > 760");
}
return window.phantomComplete = true;
}
};
@@ -133,5 +149,5 @@ Utils.domComplete(function() {
},{}]},{},[1])
//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9rb2VuL0RvY3VtZW50cy9Qcm9qZWN0cy9GcmFtZXIzL3BlcmYvaW5pdC5jb2ZmZWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQUEsdUNBQUE7R0FBQS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