refactor(perf): use webdriver to execute benchmarks
- use performance log of chromedriver / appium to get timeline data for calculating metrics for benchmarks - change all benchmarks to be made of a standalone application and a protractor test that collectes timeline data - fix and simplify benchmarks - add dart2js to build - remove benchpress Closes #330
This commit is contained in:
42
modules/benchmarks/test/perf/di_perf.js
Normal file
42
modules/benchmarks/test/perf/di_perf.js
Normal file
@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
var util = require('../../../../tools/perf/util.js');
|
||||
|
||||
describe('ng2 di benchmark', function () {
|
||||
|
||||
var URL = 'benchmarks/web/di/di_benchmark.html';
|
||||
|
||||
afterEach(util.verifyNoErrors);
|
||||
|
||||
it('should log the stats for getByToken', function() {
|
||||
util.runSimpleBenchmark({
|
||||
url: URL,
|
||||
buttons: ['#getByToken'],
|
||||
name: browser.params.lang+'.ng2.di.getByToken'
|
||||
});
|
||||
});
|
||||
|
||||
it('should log the stats for getByKey', function() {
|
||||
util.runSimpleBenchmark({
|
||||
url: URL,
|
||||
buttons: ['#getByKey'],
|
||||
name: browser.params.lang+'.ng2.di.getByKey'
|
||||
});
|
||||
});
|
||||
|
||||
it('should log the stats for getChild', function() {
|
||||
util.runSimpleBenchmark({
|
||||
url: URL,
|
||||
buttons: ['#getChild'],
|
||||
name: browser.params.lang+'.ng2.di.getChild'
|
||||
});
|
||||
});
|
||||
|
||||
it('should log the stats for instantiate', function() {
|
||||
util.runSimpleBenchmark({
|
||||
url: URL,
|
||||
buttons: ['#instantiate'],
|
||||
name: browser.params.lang+'.ng2.di.instantiate'
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user