chore(benchpress): make benchpress compile

Also adds compiling benchpress to the build scripts to verify that.
This commit is contained in:
Jason Choi 2016-08-03 12:32:26 -07:00 committed by Alex Rickabaugh
parent c8d53d71a3
commit 3fcd6fd93f
54 changed files with 154 additions and 280 deletions

View File

@ -116,3 +116,6 @@ do
$(npm bin)/uglifyjs -c --screw-ie8 -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH} $(npm bin)/uglifyjs -c --screw-ie8 -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH}
fi fi
done done
echo "====== COMPILING: \$(npm bin)/tsc -p benchpress/tsconfig.json ====="
$(npm bin)/tsc -p ./modules/benchpress/tsconfig.json

View File

@ -1,9 +1,9 @@
import {bootstrap} from '@angular/platform-browser'; import {bootstrap} from '@angular/platform-browser';
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';
import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {ListWrapper, Map, MapWrapper} from '@angular/facade'; import {ListWrapper, Map, MapWrapper} from '@angular/facade/src/collection';
import {DateWrapper, Type, print, isPresent} from '@angular/facade'; import {DateWrapper, Type, print, isPresent} from '@angular/facade/src/lang';
import { import {
ComponentResolver, ComponentResolver,

View File

@ -1,6 +1,6 @@
import {SelectorMatcher} from '@angular/compiler/src/selector'; import {SelectorMatcher} from '@angular/compiler/src/selector';
import {CssSelector} from '@angular/compiler/src/selector'; import {CssSelector} from '@angular/compiler/src/selector';
import {StringWrapper, Math} from '@angular/facade'; import {StringWrapper, Math} from '@angular/facade/lang';
import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util';
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';

View File

@ -2,7 +2,7 @@ import {bootstrap} from '@angular/platform-browser';
import {Component, Directive, DynamicComponentLoader, ViewContainerRef} from '@angular/core'; import {Component, Directive, DynamicComponentLoader, ViewContainerRef} from '@angular/core';
import {NgIf, NgFor} from '@angular/common'; import {NgIf, NgFor} from '@angular/common';
import {ApplicationRef} from '@angular/core/src/application_ref'; import {ApplicationRef} from '@angular/core/src/application_ref';
import {ListWrapper} from '@angular/facade'; import {ListWrapper} from '@angular/facade/src/lang';
import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util';
var testList = null; var testList = null;

View File

@ -1,5 +1,5 @@
import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {window, document, gc} from '@angular/facade'; import {window, document, gc} from '@angular/facade/src/browser';
import { import {
getIntParameter, getIntParameter,
getStringParameter, getStringParameter,
@ -13,7 +13,7 @@ import {NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from '@angular/common';
import {ApplicationRef} from '@angular/core/src/application_ref'; import {ApplicationRef} from '@angular/core/src/application_ref';
import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter'; import {BrowserDomAdapter} from '@angular/platform-browser/src/browser/browser_adapter';
import {ListWrapper} from '@angular/facade'; import {ListWrapper} from '@angular/facade/src/collection';
import {Inject} from '@angular/core/src/di/decorators'; import {Inject} from '@angular/core/src/di/decorators';
import {reflector} from '@angular/core/src/reflection/reflection'; import {reflector} from '@angular/core/src/reflection/reflection';

View File

@ -1,10 +1,10 @@
import {isPresent} from '@angular/facade'; import {isPresent} from '@angular/facade/src/lang';
import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util';
import {TimerWrapper} from '@angular/facade'; import {TimerWrapper} from '@angular/facade/src/async';
import {ScrollAreaComponent} from './scroll_area'; import {ScrollAreaComponent} from './scroll_area';
import {NgIf, NgFor} from '@angular/common'; import {NgIf, NgFor} from '@angular/common';
import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {document} from '@angular/facade'; import {document} from '@angular/facade/src/browser';
import {Component, Directive} from '@angular/core'; import {Component, Directive} from '@angular/core';

View File

@ -1,4 +1,4 @@
import {ListWrapper, Map} from '@angular/facade'; import {ListWrapper, Map} from '@angular/facade/src/collection';
import {Company, Opportunity, Offering, Account, CustomDate, STATUS_LIST} from './common'; import {Company, Opportunity, Offering, Account, CustomDate, STATUS_LIST} from './common';
import {NgFor} from '@angular/common'; import {NgFor} from '@angular/common';

View File

@ -1,6 +1,6 @@
import {Math} from '@angular/facade'; import {Math} from '@angular/facade/src/math';
import {StringWrapper} from '@angular/facade'; import {StringWrapper} from '@angular/facade/src/lang';
import {ListWrapper, Map, MapWrapper} from '@angular/facade'; import {ListWrapper, Map, MapWrapper} from '@angular/facade/src/collection';
export var ITEMS = 1000; export var ITEMS = 1000;
export var ITEM_HEIGHT = 40; export var ITEM_HEIGHT = 40;

View File

@ -1,4 +1,4 @@
import {StringWrapper} from '@angular/facade'; import {StringWrapper} from '@angular/facade/src/lang';
import { import {
CustomDate, CustomDate,
Offering, Offering,

View File

@ -1,5 +1,5 @@
import {ListWrapper} from '@angular/facade'; import {ListWrapper} from '@angular/facade/src/collection';
import {Math} from '@angular/facade'; import {Math} from '@angular/facade/src/math';
import {Component, Directive} from '@angular/core'; import {Component, Directive} from '@angular/core';

View File

@ -5,7 +5,7 @@ import {ApplicationRef} from '@angular/core/src/application_ref';
import {reflector} from '@angular/core/src/reflection/reflection'; import {reflector} from '@angular/core/src/reflection/reflection';
import {ReflectionCapabilities} from '@angular/core/src/reflection/reflection_capabilities'; import {ReflectionCapabilities} from '@angular/core/src/reflection/reflection_capabilities';
import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {window, document, gc} from '@angular/facade'; import {window, document, gc} from '@angular/facade/src/browser';
import { import {
getIntParameter, getIntParameter,
getStringParameter, getStringParameter,

View File

@ -7,8 +7,8 @@ import {NgIf} from '@angular/common';
import {ApplicationRef} from '@angular/core/src/application_ref'; import {ApplicationRef} from '@angular/core/src/application_ref';
import {DOM} from '@angular/platform-browser/src/dom/dom_adapter'; import {DOM} from '@angular/platform-browser/src/dom/dom_adapter';
import {isPresent} from '@angular/facade'; import {isPresent} from '@angular/facade/src/lang';
import {window, document, gc} from '@angular/facade'; import {window, document, gc} from '@angular/facade/src/browser';
import { import {
getIntParameter, getIntParameter,
getStringParameter, getStringParameter,

View File

@ -1,5 +1,5 @@
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';
import {DateWrapper} from '@angular/facade'; import {DateWrapper} from '@angular/facade/src/lang';
export class Options { export class Options {
static get DEFAULT_PROVIDERS(): any[] { return _DEFAULT_PROVIDERS; } static get DEFAULT_PROVIDERS(): any[] { return _DEFAULT_PROVIDERS; }

View File

@ -1,5 +1,5 @@
import {Date, DateWrapper} from '@angular/facade'; import {Date, DateWrapper} from '@angular/facade/src/lang';
import {Map} from '@angular/facade'; import {Map} from '@angular/facade/src/collection';
export class MeasureValues { export class MeasureValues {
constructor(public runIndex: number, public timeStamp: Date, constructor(public runIndex: number, public timeStamp: Date,

View File

@ -1,4 +1,4 @@
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
/** /**
* A metric is measures values * A metric is measures values

View File

@ -1,6 +1,6 @@
import {Injector, OpaqueToken} from '@angular/core/src/di'; import {Injector, OpaqueToken} from '@angular/core/src/di';
import {StringMapWrapper} from '@angular/facade'; import {StringMapWrapper} from '@angular/facade/src/collection';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Metric} from '../metric'; import {Metric} from '../metric';

View File

@ -1,14 +1,7 @@
import {PromiseWrapper, TimerWrapper} from '@angular/facade'; import {PromiseWrapper, TimerWrapper} from '@angular/facade/src/async';
import { import {isPresent, isBlank, StringWrapper, Math, RegExpWrapper, NumberWrapper} from '@angular/facade/src/lang';
isPresent, import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
isBlank, import {ListWrapper, StringMapWrapper} from '@angular/facade/src/collection';
StringWrapper,
Math,
RegExpWrapper,
NumberWrapper
} from '@angular/facade';
import {BaseException, WrappedException} from '@angular/facade';
import {ListWrapper, StringMapWrapper} from '@angular/facade';
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';
import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension';

View File

@ -1,7 +1,7 @@
import {bind, Provider, OpaqueToken} from 'angular2/src/core/di'; import {bind, Provider, OpaqueToken} from '@angular/core';
import {PromiseWrapper, TimerWrapper} from 'angular2/src/facade/async'; import {PromiseWrapper, TimerWrapper} from '@angular/facade/src/async';
import {StringMapWrapper} from 'angular2/src/facade/collection'; import {StringMapWrapper} from '@angular/facade/src/collection';
import {isNumber} from 'angular2/src/facade/lang'; import {isNumber} from '@angular/facade/src/lang';
import {Metric} from '../metric'; import {Metric} from '../metric';
import {Options} from '../common_options'; import {Options} from '../common_options';

View File

@ -1,4 +1,4 @@
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {MeasureValues} from './measure_values'; import {MeasureValues} from './measure_values';
/** /**

View File

@ -1,7 +1,7 @@
import {print, isPresent, isBlank, NumberWrapper} from '@angular/facade'; import {print, isPresent, isBlank, NumberWrapper} from '@angular/facade/src/lang';
import {StringMapWrapper, ListWrapper} from '@angular/facade'; import {StringMapWrapper, ListWrapper} from '@angular/facade/src/collection';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Math} from '@angular/facade'; import {Math} from '@angular/facade/src/math';
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';
import {Statistic} from '../statistic'; import {Statistic} from '../statistic';

View File

@ -1,5 +1,5 @@
import {DateWrapper, isPresent, isBlank, Json} from '@angular/facade'; import {DateWrapper, isPresent, isBlank, Json} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';

View File

@ -1,5 +1,5 @@
import {Injector, OpaqueToken} from '@angular/core/src/di'; import {Injector, OpaqueToken} from '@angular/core/src/di';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {MeasureValues} from '../measure_values'; import {MeasureValues} from '../measure_values';
import {Reporter} from '../reporter'; import {Reporter} from '../reporter';

View File

@ -1,6 +1,6 @@
import {ReflectiveInjector} from '@angular/core'; import {ReflectiveInjector} from '@angular/core';
import {isPresent, isBlank} from '@angular/facade'; import {isPresent, isBlank} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Sampler, SampleState} from './sampler'; import {Sampler, SampleState} from './sampler';
import {ConsoleReporter} from './reporter/console_reporter'; import {ConsoleReporter} from './reporter/console_reporter';
@ -93,7 +93,7 @@ var _DEFAULT_PROVIDERS = [
FirefoxDriverExtension.PROVIDERS, FirefoxDriverExtension.PROVIDERS,
IOsDriverExtension.PROVIDERS, IOsDriverExtension.PROVIDERS,
PerflogMetric.PROVIDERS, PerflogMetric.PROVIDERS,
UserMetric.BINDINGS, UserMetric.PROVIDERS,
SampleDescription.PROVIDERS, SampleDescription.PROVIDERS,
MultiReporter.createBindings([ConsoleReporter]), MultiReporter.createBindings([ConsoleReporter]),
MultiMetric.createBindings([PerflogMetric, UserMetric]), MultiMetric.createBindings([PerflogMetric, UserMetric]),

View File

@ -1,4 +1,4 @@
import {StringMapWrapper} from '@angular/facade'; import {StringMapWrapper} from '@angular/facade/src/collection';
import {Validator} from './validator'; import {Validator} from './validator';
import {Metric} from './metric'; import {Metric} from './metric';
import {Options} from './common_options'; import {Options} from './common_options';

View File

@ -1,5 +1,5 @@
import {isPresent, isBlank, Date, DateWrapper} from '@angular/facade'; import {isPresent, isBlank, Date, DateWrapper} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Metric} from './metric'; import {Metric} from './metric';
import {Validator} from './validator'; import {Validator} from './validator';

View File

@ -1,4 +1,4 @@
import {Math} from '@angular/facade'; import {Math} from '@angular/facade/src/math';
export class Statistic { export class Statistic {
static calculateCoefficientOfVariation(sample, mean) { static calculateCoefficientOfVariation(sample, mean) {

View File

@ -1,4 +1,4 @@
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {MeasureValues} from './measure_values'; import {MeasureValues} from './measure_values';

View File

@ -1,4 +1,4 @@
import {ListWrapper} from '@angular/facade'; import {ListWrapper} from '@angular/facade/src/collection';
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';
import {Validator} from '../validator'; import {Validator} from '../validator';
@ -55,7 +55,7 @@ var _SAMPLE_SIZE = new OpaqueToken('RegressionSlopeValidator.sampleSize');
var _METRIC = new OpaqueToken('RegressionSlopeValidator.metric'); var _METRIC = new OpaqueToken('RegressionSlopeValidator.metric');
var _PROVIDERS = [ var _PROVIDERS = [
{ {
provide: RegressionSlopeValidator provide: RegressionSlopeValidator,
useFactory: (sampleSize, metric) => new RegressionSlopeValidator(sampleSize, metric), useFactory: (sampleSize, metric) => new RegressionSlopeValidator(sampleSize, metric),
deps: [_SAMPLE_SIZE, _METRIC] deps: [_SAMPLE_SIZE, _METRIC]
}, },

View File

@ -1,4 +1,4 @@
import {ListWrapper} from '@angular/facade'; import {ListWrapper} from '@angular/facade/src/collection';
import {OpaqueToken} from '@angular/core/src/di'; import {OpaqueToken} from '@angular/core/src/di';
import {Validator} from '../validator'; import {Validator} from '../validator';

View File

@ -1,5 +1,5 @@
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {Map} from '@angular/facade'; import {Map} from '@angular/facade/src/collection';
/** /**
* A WebDriverAdapter bridges API differences between different WebDriver clients, * A WebDriverAdapter bridges API differences between different WebDriver clients,

View File

@ -1,7 +1,7 @@
import {Injector, OpaqueToken} from '@angular/core/src/di'; import {Injector, OpaqueToken} from '@angular/core/src/di';
import {isBlank, isPresent} from '@angular/facade'; import {isBlank, isPresent} from '@angular/facade/src/lang';
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {Options} from './common_options'; import {Options} from './common_options';

View File

@ -1,4 +1,4 @@
import {ListWrapper, StringMapWrapper} from '@angular/facade'; import {ListWrapper, StringMapWrapper} from '@angular/facade/src/collection';
import { import {
Json, Json,
isPresent, isPresent,
@ -6,8 +6,8 @@ import {
RegExpWrapper, RegExpWrapper,
StringWrapper, StringWrapper,
NumberWrapper NumberWrapper
} from '@angular/facade'; } from '@angular/facade/src/lang';
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension';
import {WebDriverAdapter} from '../web_driver_adapter'; import {WebDriverAdapter} from '../web_driver_adapter';

View File

@ -1,4 +1,4 @@
import {isPresent, StringWrapper} from '@angular/facade'; import {isPresent, StringWrapper} from '@angular/facade/src/lang';
import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension';
import {WebDriverAdapter} from '../web_driver_adapter'; import {WebDriverAdapter} from '../web_driver_adapter';

View File

@ -1,5 +1,5 @@
import {Json, isPresent, isBlank, RegExpWrapper, StringWrapper} from '@angular/facade'; import {Json, isPresent, isBlank, RegExpWrapper, StringWrapper} from '@angular/facade/src/lang';
import {BaseException, WrappedException} from '@angular/facade'; import {BaseException, WrappedException} from '@angular/facade/src/exceptions';
import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension'; import {WebDriverExtension, PerfLogFeatures} from '../web_driver_extension';
import {WebDriverAdapter} from '../web_driver_adapter'; import {WebDriverAdapter} from '../web_driver_adapter';

View File

@ -1,4 +1,4 @@
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {WebDriverAdapter} from '../web_driver_adapter'; import {WebDriverAdapter} from '../web_driver_adapter';
import * as webdriver from 'selenium-webdriver'; import * as webdriver from 'selenium-webdriver';

View File

@ -1,15 +1,4 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/core/testing';
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
import {Metric, MultiMetric, ReflectiveInjector} from 'benchpress/common'; import {Metric, MultiMetric, ReflectiveInjector} from 'benchpress/common';
export function main() { export function main() {

View File

@ -1,19 +1,8 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {StringMapWrapper} from '@angular/facade'; import {StringMapWrapper} from '@angular/facade/src/collection';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {isPresent, isBlank} from '@angular/facade'; import {isPresent, isBlank} from '@angular/facade/src/lang';
import { import {
Metric, Metric,
@ -46,7 +35,7 @@ export function main() {
if (isBlank(microMetrics)) { if (isBlank(microMetrics)) {
microMetrics = StringMapWrapper.create(); microMetrics = StringMapWrapper.create();
} }
var providers = [ var providers: any[] = [
Options.DEFAULT_PROVIDERS, Options.DEFAULT_PROVIDERS,
PerflogMetric.PROVIDERS, PerflogMetric.PROVIDERS,
{provide: Options.MICRO_METRICS, useValue: microMetrics}, {provide: Options.MICRO_METRICS, useValue: microMetrics},
@ -63,7 +52,7 @@ export function main() {
} }
]; ];
if (isPresent(forceGc)) { if (isPresent(forceGc)) {
providers.push({provide: Options.FORCE_GC, useValue(forceGc)}; providers.push({provide: Options.FORCE_GC, useValue: forceGc});
} }
if (isPresent(captureFrames)) { if (isPresent(captureFrames)) {
providers.push({provide: Options.CAPTURE_FRAMES, useValue: captureFrames}); providers.push({provide: Options.CAPTURE_FRAMES, useValue: captureFrames});

View File

@ -1,21 +1,10 @@
import {ReflectiveInjector} from "angular2/core"; import {ReflectiveInjector} from '@angular/core';
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit
} from 'angular2/testing_internal';
import {TimerWrapper} from 'angular2/src/facade/async'; import {TimerWrapper} from '@angular/facade/src/async';
import {StringMapWrapper} from 'angular2/src/facade/collection'; import {StringMapWrapper} from '@angular/facade/src/collection';
import {PromiseWrapper} from 'angular2/src/facade/async'; import {PromiseWrapper} from '@angular/facade/src/async';
import {isPresent, isBlank, Json} from 'angular2/src/facade/lang'; import {isPresent, isBlank, Json} from '@angular/facade/src/lang';
import { import {
Metric, Metric,
@ -46,7 +35,7 @@ export function main() {
wdAdapter = new MockDriverAdapter(); wdAdapter = new MockDriverAdapter();
var bindings = [ var bindings = [
Options.DEFAULT_PROVIDERS, Options.DEFAULT_PROVIDERS,
UserMetric.BINDINGS, UserMetric.PROVIDERS,
bind(Options.USER_METRICS).toValue(userMetrics), bind(Options.USER_METRICS).toValue(userMetrics),
provide(WebDriverAdapter, {useValue: wdAdapter}) provide(WebDriverAdapter, {useValue: wdAdapter})
]; ];

View File

@ -1,15 +1,6 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
describe,
ddescribe,
it,
iit,
xit,
expect,
beforeEach,
afterEach
} from '@angular/testing/testing_internal';
import {isBlank, isPresent, Date, DateWrapper} from '@angular/facade'; import {isBlank, isPresent, Date, DateWrapper} from '@angular/facade/src/lang';
import { import {
SampleState, SampleState,
@ -40,7 +31,7 @@ export function main() {
{provide: ConsoleReporter.PRINT, useValue: (line) => log.push(line)} {provide: ConsoleReporter.PRINT, useValue: (line) => log.push(line)}
]; ];
if (isPresent(columnWidth)) { if (isPresent(columnWidth)) {
bindings.push({provide: ConsoleReporter.COLUMN_WIDTH, useValue(columnWidth)}; bindings.push({provide: ConsoleReporter.COLUMN_WIDTH, useValue: columnWidth});
} }
reporter = ReflectiveInjector.resolveAndCreate(bindings).get(ConsoleReporter); reporter = ReflectiveInjector.resolveAndCreate(bindings).get(ConsoleReporter);
} }

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {DateWrapper, Json, RegExpWrapper, isPresent} from '@angular/facade'; import {DateWrapper, Json, RegExpWrapper, isPresent} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import { import {
ReflectiveInjector, ReflectiveInjector,
@ -32,7 +21,7 @@ export function main() {
var bindings = [ var bindings = [
JsonFileReporter.PROVIDERS, JsonFileReporter.PROVIDERS,
{provide: SampleDescription, useValue: new SampleDescription(sampleId, descriptions, metrics)}, {provide: SampleDescription, useValue: new SampleDescription(sampleId, descriptions, metrics)},
{provide: JsonFileReporter.PATH, useValue(path)}, {provide: JsonFileReporter.PATH, useValue: path},
{provide: Options.NOW, useValue: () => DateWrapper.fromMillis(1234)}, {provide: Options.NOW, useValue: () => DateWrapper.fromMillis(1234)},
{ {
provide: Options.WRITE_FILE, provide: Options.WRITE_FILE,

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {DateWrapper} from '@angular/facade'; import {DateWrapper} from '@angular/facade/src/lang';
import { import {
Reporter, Reporter,

View File

@ -1,15 +1,4 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import { import {
Runner, Runner,
Sampler, Sampler,
@ -22,8 +11,8 @@ import {
WebDriverAdapter, WebDriverAdapter,
SampleState SampleState
} from 'benchpress/common'; } from 'benchpress/common';
import {isBlank} from '@angular/facade'; import {isBlank} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
export function main() { export function main() {
describe('runner', () => { describe('runner', () => {

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {isBlank, isPresent, stringify, Date, DateWrapper} from '@angular/facade'; import {isBlank, isPresent, stringify, Date, DateWrapper} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import { import {
Sampler, Sampler,

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
describe,
ddescribe,
it,
iit,
xit,
expect,
beforeEach,
afterEach
} from '@angular/testing/testing_internal';
import {Statistic} from 'benchpress/src/statistic'; import {Statistic} from 'benchpress/src/statistic';
import {NaN} from '@angular/facade';
export function main() { export function main() {
describe('statistic', () => { describe('statistic', () => {

View File

@ -1,4 +1,4 @@
import {isPresent} from '@angular/facade'; import {isPresent} from '@angular/facade/src/lang';
export class TraceEventFactory { export class TraceEventFactory {
private _cat: string; private _cat: string;

View File

@ -1,15 +1,6 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
describe, import {Date, DateWrapper} from '@angular/facade/src/lang';
ddescribe, import {ListWrapper} from '@angular/facade/src/collection';
it,
iit,
xit,
expect,
beforeEach,
afterEach
} from '@angular/testing/testing_internal';
import {Date, DateWrapper} from '@angular/facade';
import {ListWrapper} from '@angular/facade';
import { import {
RegressionSlopeValidator, RegressionSlopeValidator,
@ -24,8 +15,8 @@ export function main() {
function createValidator({size, metric}) { function createValidator({size, metric}) {
validator = ReflectiveInjector.resolveAndCreate([ validator = ReflectiveInjector.resolveAndCreate([
RegressionSlopeValidator.PROVIDERS, RegressionSlopeValidator.PROVIDERS,
{provide: RegressionSlopeValidator.METRIC, useValue(metric)}, {provide: RegressionSlopeValidator.METRIC, useValue: metric},
{provide: RegressionSlopeValidator.SAMPLE_SIZE, useValue(size)} {provide: RegressionSlopeValidator.SAMPLE_SIZE, useValue: size}
]) ])
.get(RegressionSlopeValidator); .get(RegressionSlopeValidator);
} }

View File

@ -1,15 +1,6 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
describe, import {Date, DateWrapper} from '@angular/facade/src/lang';
ddescribe, import {ListWrapper} from '@angular/facade/src/collection';
it,
iit,
xit,
expect,
beforeEach,
afterEach
} from '@angular/testing/testing_internal';
import {Date, DateWrapper} from '@angular/facade';
import {ListWrapper} from '@angular/facade';
import { import {
Validator, Validator,

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {isPresent, StringWrapper} from '@angular/facade'; import {isPresent, StringWrapper} from '@angular/facade/src/lang';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {WebDriverExtension, ReflectiveInjector, Options} from 'benchpress/common'; import {WebDriverExtension, ReflectiveInjector, Options} from 'benchpress/common';

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Json, isBlank} from '@angular/facade'; import {Json, isBlank} from '@angular/facade/src/lang';
import { import {
WebDriverExtension, WebDriverExtension,
@ -59,7 +48,7 @@ export function main() {
ReflectiveInjector.resolveAndCreate([ ReflectiveInjector.resolveAndCreate([
ChromeDriverExtension.PROVIDERS, ChromeDriverExtension.PROVIDERS,
{provide: WebDriverAdapter, useValue: new MockDriverAdapter(log, perfRecords, messageMethod)}, {provide: WebDriverAdapter, useValue: new MockDriverAdapter(log, perfRecords, messageMethod)},
{provide: Options.USER_AGENT, useValue(userAgent)} {provide: Options.USER_AGENT, useValue: userAgent}
]) ])
.get(ChromeDriverExtension); .get(ChromeDriverExtension);
return extension; return extension;

View File

@ -1,18 +1,7 @@
import { import {afterEach, AsyncTestCompleter, beforeEach, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
afterEach,
AsyncTestCompleter,
beforeEach,
ddescribe,
describe,
expect,
iit,
inject,
it,
xit,
} from '@angular/testing/testing_internal';
import {PromiseWrapper} from '@angular/facade'; import {PromiseWrapper} from '@angular/facade/src/async';
import {Json, isBlank, isPresent} from '@angular/facade'; import {Json, isBlank, isPresent} from '@angular/facade/src/lang';
import { import {
WebDriverExtension, WebDriverExtension,

View File

@ -1,12 +1,23 @@
{ {
"compilerOptions": { "compilerOptions": {
"emitDecoratorMetadata": true, "baseUrl": ".",
"declaration": true, "declaration": true,
"module": "commonjs", "experimentalDecorators": true,
"rootDir": ".", "module": "commonjs",
"sourceMap": true, "moduleResolution": "node",
"sourceRoot": ".", "outDir": "../../dist/all/benchpress",
"target": "ES5", "noImplicitAny": false,
"outDir": "../../dist/js/cjs" "noFallthroughCasesInSwitch": true,
} "paths": {
"selenium-webdriver": ["../../node_modules/@types/selenium-webdriver/index.d.ts"],
"rxjs/*": ["../../node_modules/rxjs/*"],
"@angular/*": ["../../dist/all/@angular/*"],
"benchpress/*": ["./*"]
},
"rootDir": ".",
"inlineSourceMap": true,
"lib": ["es5", "dom", "es2015.promise", "es2015.collection", "es2015.iterable"],
"skipDefaultLibCheck": true,
"target": "es5"
}
} }

14
modules/benchpress/types.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file contains all ambient imports needed to compile the modules/ source code
/// <reference path="../../node_modules/@types/node/index.d.ts" />
/// <reference path="../../node_modules/@types/jasmine/index.d.ts" />
/// <reference path="../../node_modules/@types/protractor/index.d.ts" />
/// <reference path="../../node_modules/@types/selenium-webdriver/index.d.ts" />

View File

@ -14,5 +14,6 @@ $(npm bin)/tsc -p tools
cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped
node dist/tools/@angular/tsc-wrapped/src/main -p modules node dist/tools/@angular/tsc-wrapped/src/main -p modules
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router
$(npm bin)/tsc -p modules/benchpress
echo 'travis_fold:end:BUILD' echo 'travis_fold:end:BUILD'

View File

@ -71,7 +71,7 @@ if (platform == 'node') {
onChangeCmds: [ onChangeCmds: [
processOutputEmitterCodeGen, processOutputEmitterCodeGen,
[ [
'node', 'dist/tools/cjs-jasmine', '--', '{@angular,benchpress}/**/*_spec.js', 'node', 'dist/tools/cjs-jasmine', '--', '@angular/**/*_spec.js',
'@angular/compiler-cli/test/**/*_spec.js' '@angular/compiler-cli/test/**/*_spec.js'
] ]
] ]