feat(benchpress): add custom user metric to benchpress

This is a continuation of #7440 (@jeffbcross).

Closes #9229
This commit is contained in:
Olivier Chafik
2016-04-20 17:01:51 -07:00
committed by Tobias Bosch
parent 1eaa193c51
commit 6686bc62f6
14 changed files with 283 additions and 4 deletions

View File

@ -29,6 +29,9 @@
<li>
<a href="costs/index.html">Benchmarks measuring costs of things</a>
</li>
<li>
<a href="page_load/page_load.html">Benchmark measuring time to bootstrap</a>
</li>
</ul>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!doctype html>
<html>
<body>
<h2>Angular2 page load benchmark</h2>
<div>
<app></app>
</div>
$SCRIPTS$
</body>
</html>

View File

@ -0,0 +1,11 @@
import {Component} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
@Component({selector: 'app', template: '<h1>Page Load Time</h1>'})
class App {
}
bootstrap(App).then(() => {
(<any>window).loadTime = Date.now() - performance.timing.navigationStart;
(<any>window).someConstant = 1234567890;
});