perf(ivy): add create scenario to the styling benchmark (#34775)

PR Close #34775
This commit is contained in:
Pawel Kozlowski 2020-01-14 15:35:36 +01:00 committed by atscott
parent 4f6924c622
commit c2766f4e82
1 changed files with 14 additions and 0 deletions

View File

@ -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();
}