Browse Source

Added fps to test server stats

v1.x
Tj Holowaychuk 14 years ago
parent
commit
3baf5ff7e9
  1. 5
      test/public/app.js
  2. 3
      test/public/style.css

5
test/public/app.js

@ -66,7 +66,9 @@ function runTest(name, canvas, dest, stats) {
} catch (err) {
log(err);
}
stats.appendChild(create('p', 'browser: ' + (new Date - start) + 'ms'));
var duration = new Date - start;
stats.appendChild(create('p', 'browser: ' + duration + 'ms'));
stats.appendChild(create('p', 'fps: ' + (1000 / duration).toFixed(0)));
renderOnServer(name, canvas, function(res){
if (res.error) {
var p = create('p');
@ -76,6 +78,7 @@ function runTest(name, canvas, dest, stats) {
var img = create('img');
img.src = res.data;
stats.appendChild(create('p', 'node: ' + res.duration + 'ms'));
stats.appendChild(create('p', 'fps: ' + (1000 / res.duration).toFixed(0)));
dest.appendChild(img);
}
});

3
test/public/style.css

@ -33,4 +33,7 @@ table tr td:nth-child(2) {
}
table tr td:nth-child(3) {
padding: 0 45px;
}
table tr td p {
margin: 5px 0;
}
Loading…
Cancel
Save