From c2766f4e82db838b6ad845a0f8e0a53d7e18e3a6 Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Tue, 14 Jan 2020 15:35:36 +0100 Subject: [PATCH] perf(ivy): add create scenario to the styling benchmark (#34775) PR Close #34775 --- .../benchmarks/src/styling/styling_perf.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/benchmarks/src/styling/styling_perf.spec.ts b/modules/benchmarks/src/styling/styling_perf.spec.ts index c0383242fc..7018627aac 100644 --- a/modules/benchmarks/src/styling/styling_perf.spec.ts +++ b/modules/benchmarks/src/styling/styling_perf.spec.ts @@ -45,6 +45,16 @@ describe('styling benchmark spec', () => { // Create benchmarks for each possible test scenario. SCENARIOS.forEach(({optionIndex, id}) => { describe(id, () => { + it('should run create benchmark', done => { + runStylingBenchmark(`styling.${id}.create`, { + work: () => create(), + prepare: () => { + selectScenario(optionIndex); + destroy(); + }, + }).then(done, done.fail); + }); + it('should run update benchmark', done => { runStylingBenchmark(`styling.${id}.update`, { work: () => update(), @@ -77,6 +87,10 @@ function create() { $('#create').click(); } +function destroy() { + $('#destroy').click(); +} + function update() { $('#update').click(); }