Example benchmark
Just an example benchmark using PHPBench to get things started.
$ phpbench report --uuid=latest --report=hoa
benchmark: RulerBench, subject: benchAssert
+---------------------------------------------------------------+------+-----+------------+---------+---------+---------+--------+
| params | revs | its | mem_peak | best | mean | mode | rstdev |
+---------------------------------------------------------------+------+-----+------------+---------+---------+---------+--------+
| {"rule":"group in [\"customer\", \"guest\"] and points > 30"} | 10 | 10 | 2,249,760b | 3.786ms | 4.724ms | 4.123ms | 15.20% |
| {"rule":"points > 30"} | 10 | 10 | 2,200,408b | 1.386ms | 1.836ms | 1.909ms | 17.00% |
| {"rule":"group in [\"customer\", \"guest\"]"} | 10 | 10 | 2,216,400b | 2.240ms | 2.781ms | 2.715ms | 15.34% |
+---------------------------------------------------------------+------+-----+------------+---------+---------+---------+--------+``
Not currently, sounds like something that could easily be configured
though (i.e. assert_ instead of bench)
On Mon, Sep 26, 2016 at 05:20:18AM -0700, Ivan Enderlin wrote:
@Hywan commented on this pull request.
In [1]Test/Benchmark/RulerBench.php:
],
['rule' => 'points > 30'],];- } +
- /**
\* Benchmark parsing with rules of different complexity.\* Executes the method once (warmup) before measuring time.*\* @Warmup(1)\* @BeforeMethods({"setUpAssert"})\* @ParamProviders({"provideRules"})*/- public function benchAssert($params)
So there is no way to say: “All methods matching this pattern are of kind bench”?
— You are receiving this because you authored the thread. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.
Reverse link: [4]unknown
References
Visible links
- https://github.com/hoaproject/Ruler/pull/96
- https://github.com/hoaproject/Ruler/pull/96
- https://github.com/notifications/unsubscribe-auth/AAgZcQIOyBIeqWioLjZfmtK-jRt2hSjuks5qt7iCgaJpZM4KFmfz
- https://github.com/hoaproject/Ruler/pull/96
It could be a good idea and a good feature!
@dantleech Am I a despot if I ask you to update this PR based on PHPBench 0.12.2?
@Hywan no problem, updated :)