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:
parent
3d4067a464
commit
65dbd50594
|
@ -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`
|
- `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 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`
|
|
@ -26,8 +26,8 @@ const benchmarks: Benchmark[] = [];
|
||||||
|
|
||||||
function benchmark(
|
function benchmark(
|
||||||
name: string, template: ComponentTemplate<any>, baselineTemplate: ComponentTemplate<any>) {
|
name: string, template: ComponentTemplate<any>, baselineTemplate: ComponentTemplate<any>) {
|
||||||
const ivyHarness = setupTestHarness(template, 1, 1, 1000, context, consts);
|
const ivyHarness = setupTestHarness(template, 1, 4, 1000, context, consts);
|
||||||
const baseHarness = setupTestHarness(baselineTemplate, 1, 1, 1000, context, consts);
|
const baseHarness = setupTestHarness(baselineTemplate, 1, 4, 1000, context, consts);
|
||||||
|
|
||||||
if (PROFILE_CREATE) {
|
if (PROFILE_CREATE) {
|
||||||
const benchmark = createBenchmark('class binding[create]: ' + name);
|
const benchmark = createBenchmark('class binding[create]: ' + name);
|
||||||
|
|
|
@ -149,7 +149,7 @@ function dirThatSetsFooClassesHostBindings(rf: RenderFlags, ctx: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const rootLView = setupRootViewWithEmbeddedViews(
|
const rootLView = setupRootViewWithEmbeddedViews(
|
||||||
testTemplate, 11, 10, 1000, null,
|
testTemplate, 11, 40, 1000, null,
|
||||||
[
|
[
|
||||||
['dir-that-sets-width', '', 'dir-that-sets-foo-class', ''],
|
['dir-that-sets-width', '', 'dir-that-sets-foo-class', ''],
|
||||||
],
|
],
|
||||||
|
|
|
@ -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];
|
const rootTView = rootLView[TVIEW];
|
||||||
|
|
||||||
// scenario to benchmark
|
// scenario to benchmark
|
||||||
|
|
Loading…
Reference in New Issue