perf(ivy): add create scenario to the styling benchmark (#34775)
PR Close #34775
This commit is contained in:
parent
4f6924c622
commit
c2766f4e82
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue