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.
|
// Create benchmarks for each possible test scenario.
|
||||||
SCENARIOS.forEach(({optionIndex, id}) => {
|
SCENARIOS.forEach(({optionIndex, id}) => {
|
||||||
describe(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 => {
|
it('should run update benchmark', done => {
|
||||||
runStylingBenchmark(`styling.${id}.update`, {
|
runStylingBenchmark(`styling.${id}.update`, {
|
||||||
work: () => update(),
|
work: () => update(),
|
||||||
@ -77,6 +87,10 @@ function create() {
|
|||||||
$('#create').click();
|
$('#create').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function destroy() {
|
||||||
|
$('#destroy').click();
|
||||||
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
$('#update').click();
|
$('#update').click();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user