zendframework / zend-eventmanager

Implement event systems, signal slots, intercepting filters, and observers.
BSD 3-Clause "New" or "Revised" License
1.64k stars 62 forks source link

Switching to phpbench/phpbench based benchmarks #62

Closed michalbundyra closed 7 years ago

michalbundyra commented 7 years ago

Hm... MultipleEventMultipleLocalAndSharedListenerBench::benchTrigger is very slow...

/cc @Ocramius

Ocramius commented 7 years ago

Overall looks good, but we need to also run them at least once in CI to make sure the benchmarks are maintained.

Also make sure to run this with at least --revs=2 and --iterations=2 (or higher) to ensure tests are repeatable. A --warmup would also be nice.

michalbundyra commented 7 years ago

@Ocramius

Also make sure to run this with at least --revs=2 and --iterations=2 (or higher) to ensure tests are repeatable. A --warmup would also be nice.

So you'd like to remove annotations from bench* methods and add these params on run command? Right now I have on all bench* methods:

/**
 * @Revs(1000)
 * @Iterations(20)
 */

I've done it the same way as it is done in servicemanager, and there we don't benchmarks in Travis CI, but maybe will be good to add it there as well.

Ocramius commented 7 years ago

we don't benchmarks in Travis CI, but maybe will be good to add it there as well.

The reason is to just make sure the benchmarks still run and are stable. The performance on travis is not really important.

If all tests already have >1 revs/iterations then we're fine.

michalbundyra commented 7 years ago

@Ocramius I've added running benchmarks on travis. If performance there is not important set command line params which overrides annotations. Is it ok?