php-dependency-injection-benchmarks icon indicating copy to clipboard operation
php-dependency-injection-benchmarks copied to clipboard

use tavis-ci to run the benchmarks

Open lsmith77 opened this issue 11 years ago • 4 comments

see https://travis-ci.org/phpcr/phpcr_benchmark

lsmith77 avatar Aug 10 '14 10:08 lsmith77

Does that make sense?

I mean, if you run the benchmarks on a system where other things may be starting and stopping all the time, using simple microtime(true) calls is going to produce wildly inconsistent results, isn't it?

Ideally, it needs to run on a system under no load, or at least under constant, continuous load.

mindplay-dk avatar Aug 22 '15 14:08 mindplay-dk

Personally I'd prefer to use a simple self contained benchmark script. The one I supplied does 10 runs of each tests and takes an average I'm not sure whether travis would give any more of an accurate result.

TRPB avatar Aug 22 '15 16:08 TRPB

The one I supplied does 10 runs of each tests and takes an average

Maybe take a look at the fairly simple benchmark thing I wrote.

Averages are not a very reliable way to benchmark. If you run the scripts multiple times, you can see why - deviations can be quite large.

My benchmark thing uses weighted averages, which is a statistical way to "correct" for "error" in some of the readings - then takes a set of samples and runs weighted average on those, which improves precision and gives readings that are pretty close to the same every time. Or at least a lot close than averages. Worth a look maybe, it'll take like 2 minutes to set up ;-)

mindplay-dk avatar Aug 23 '15 17:08 mindplay-dk

I'll have a look, if you check https://github.com/TomBZombie/php-dependency-injection-benchmarks/blob/master/test1-5_runner.php you'll see it ignores any results > 120% of the smallest result to stop any wild deviations :)

I've also been running it on a desktop under no load, rather than an active webserver.

TRPB avatar Aug 23 '15 18:08 TRPB