test(ivy): correct var count in perf benchmarks. (#35071)

These tests are used for perf testing and don't run as part of CI, as a result they bit-rotted. This fixes that. Long term these tests should be run as part of CI.

PR Close #35071
This commit is contained in:
Misko Hevery 2020-01-31 15:30:57 -08:00 committed by Miško Hevery
parent 3d4067a464
commit 65dbd50594
4 changed files with 8 additions and 4 deletions

View File

@ -78,3 +78,7 @@ To profile, append `_profile` to the target name and attach a debugger via chrom
- `yarn bazel run --config=ivy //packages/core/test/render3/perf:noop_change_detection_profile`
To interactively edit/rerun benchmarks use `ibazel` instead of `bazel`.
To debug
- `yarn bazel build --config=ivy //packages/core/test/render3/perf:noop_change_detection`
- `node --inspect-brk bazel-out/darwin-fastbuild/bin/packages/core/test/render3/perf/noop_change_detection.min_debug.es2015.js`

View File

@ -26,8 +26,8 @@ const benchmarks: Benchmark[] = [];
function benchmark(
name: string, template: ComponentTemplate<any>, baselineTemplate: ComponentTemplate<any>) {
const ivyHarness = setupTestHarness(template, 1, 1, 1000, context, consts);
const baseHarness = setupTestHarness(baselineTemplate, 1, 1, 1000, context, consts);
const ivyHarness = setupTestHarness(template, 1, 4, 1000, context, consts);
const baseHarness = setupTestHarness(baselineTemplate, 1, 4, 1000, context, consts);
if (PROFILE_CREATE) {
const benchmark = createBenchmark('class binding[create]: ' + name);

View File

@ -149,7 +149,7 @@ function dirThatSetsFooClassesHostBindings(rf: RenderFlags, ctx: any) {
}
const rootLView = setupRootViewWithEmbeddedViews(
testTemplate, 11, 10, 1000, null,
testTemplate, 11, 40, 1000, null,
[
['dir-that-sets-width', '', 'dir-that-sets-foo-class', ''],
],

View File

@ -78,7 +78,7 @@ function testTemplate(rf: RenderFlags, ctx: any) {
}
const rootLView = setupRootViewWithEmbeddedViews(testTemplate, 11, 10, 1000);
const rootLView = setupRootViewWithEmbeddedViews(testTemplate, 11, 40, 1000);
const rootTView = rootLView[TVIEW];
// scenario to benchmark