diff --git a/packages/core/test/render3/perf/BUILD.bazel b/packages/core/test/render3/perf/BUILD.bazel index 06e603af44..f1082aad85 100644 --- a/packages/core/test/render3/perf/BUILD.bazel +++ b/packages/core/test/render3/perf/BUILD.bazel @@ -13,6 +13,14 @@ ts_library( ], ) +ng_rollup_bundle( + name = "directive_instantiate", + entry_point = ":directive_instantiate/index.ts", + deps = [ + ":perf_lib", + ], +) + ng_rollup_bundle( name = "element_text_create", entry_point = ":element_text_create/index.ts", diff --git a/packages/core/test/render3/perf/directive_instantiate/index.ts b/packages/core/test/render3/perf/directive_instantiate/index.ts new file mode 100644 index 0000000000..5e322d62d4 --- /dev/null +++ b/packages/core/test/render3/perf/directive_instantiate/index.ts @@ -0,0 +1,100 @@ +/** + * @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 + */ +import {ɵɵdefineDirective, ɵɵelementEnd, ɵɵelementStart, ɵɵtext} from '../../../../src/render3/index'; +import {createTNode, createTView} from '../../../../src/render3/instructions/shared'; +import {RenderFlags} from '../../../../src/render3/interfaces/definition'; +import {TNodeType, TViewNode} from '../../../../src/render3/interfaces/node'; +import {resetComponentState} from '../../../../src/render3/state'; +import {createBenchmark} from '../micro_bench'; +import {createAndRenderLView} from '../setup'; + +class Tooltip { + tooltip?: string; + position?: string; + static ngFactoryDef = () => new Tooltip(); + static ngDirectiveDef = ɵɵdefineDirective({ + type: Tooltip, + selectors: [['', 'tooltip', '']], + inputs: {tooltip: 'tooltip', position: 'position'} + }); +} + +`