aboutsummaryrefslogtreecommitdiffstats
path: root/perf
diff options
context:
space:
mode:
authorMisko Hevery2010-08-14 10:09:52 -0700
committerMisko Hevery2010-08-14 10:09:52 -0700
commit550e5f8ce948f52a37286c91502bd49f44b73474 (patch)
treea51fe1e6156488755cf9ed1544fc329819f59d05 /perf
parent60eeeb9f20be3220dbb891abef848fe3754437da (diff)
downloadangular.js-550e5f8ce948f52a37286c91502bd49f44b73474.tar.bz2
change from using console to printing the timing data onto the screen
Diffstat (limited to 'perf')
-rw-r--r--perf/buzz.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/perf/buzz.html b/perf/buzz.html
index 1d0e155c..f2e95c85 100644
--- a/perf/buzz.html
+++ b/perf/buzz.html
@@ -3,6 +3,7 @@
<head>
<link rel="stylesheet" type="text/css" href="buzz.css"/>
<script type="text/javascript">
+ var log = [];
function time(timerName){
var started = new Date().getTime();
return {
@@ -15,7 +16,7 @@
var lapDuration = this.lapped - this.lastLap.time;
var lastName = this.lastLap.name;
this.lastLap = {duration:lapDuration, name:lapName, time:this.lapped};
- console.log(timerName, lapName + ': ' + this.lastLap.duration + ' ms.', '(' + totalDuration + ' ms.)');
+ log.push(timerName + ' ' + lapName + ': ' + this.lastLap.duration + ' ms. (' + totalDuration + ' ms.)');
}
};
}
@@ -24,10 +25,11 @@
<script type="text/javascript" src="../angular-minified.js" ng:autobind ng:css="css/angular.css"></script>
<script type="text/javascript">
window.browser.lap('parse <angular/>');
- function onInit() {
+ function onInit(scope) {
window.browser.lap('compile DOM');
window.setTimeout(function(){
window.browser.lap('DOM render');
+ scope.$eval();
}, 1);
}
</script>
@@ -39,8 +41,9 @@
window.browser.lap('parse model');
</script>
</head>
- <body ng:init="$window.$scope = this;$window.onInit(); activities = $window.googlebuzz" style="display:none;" ng:show="true">
- <a href="{{$location.href}}">reload</a>
+ <body ng:init="$window.$scope = this;$window.onInit(this); activities = $window.googlebuzz; log = $window.log" style="display:none;" ng:show="true">
+ <a href="{{$location.href}}">reload</a><br/>
+ <tt ng:repeat="line in log">{{line}}<br/></tt>
<hr/>
<div>
<span>&lt;angular/&gt; Buzz</span>