perf(ivy): add a proper creationOnly scenario to the tree benchmark (#21503)

PR Close #21503
This commit is contained in:
Marc Laval 2018-01-12 14:59:50 +01:00 committed by Miško Hevery
parent a0dc0a2f46
commit 0b38a039d0
1 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,7 @@ describe('tree benchmark perf', () => {
Benchmarks.forEach(benchmark => {
describe(benchmark.id, () => {
// This is actually a destroyOnly benchmark
it('should work for createOnly', (done) => {
runTreeBenchmark({
id: 'createOnly',
@ -32,6 +33,15 @@ describe('tree benchmark perf', () => {
}).then(done, done.fail);
});
it('should work for createOnlyForReal', (done) => {
runTreeBenchmark({
id: 'createOnlyForReal',
benchmark,
prepare: () => $(DestroyBtn).click(),
work: () => $(CreateBtn).click()
}).then(done, done.fail);
});
it('should work for createDestroy', (done) => {
runTreeBenchmark({
id: 'createDestroy',