feat(benchpress): add custom user metric to benchpress
This is a continuation of #7440 (@jeffbcross). Closes #9229
This commit is contained in:

committed by
Tobias Bosch

parent
1eaa193c51
commit
6686bc62f6
@ -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>
|
||||
|
0
modules/benchmarks/src/page_load/page_load.dart
Normal file
0
modules/benchmarks/src/page_load/page_load.dart
Normal file
13
modules/benchmarks/src/page_load/page_load.html
Normal file
13
modules/benchmarks/src/page_load/page_load.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h2>Angular2 page load benchmark</h2>
|
||||
|
||||
<div>
|
||||
<app></app>
|
||||
</div>
|
||||
|
||||
$SCRIPTS$
|
||||
</body>
|
||||
</html>
|
11
modules/benchmarks/src/page_load/page_load.ts
Normal file
11
modules/benchmarks/src/page_load/page_load.ts
Normal 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;
|
||||
});
|
Reference in New Issue
Block a user