yiisoft / injector

PSR-11 compatible injector
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
43 stars 18 forks source link

Add benchmark #51

Closed xepozz closed 3 years ago

xepozz commented 3 years ago
Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues

Added benchmark Now the results on my computer are:

Subjects: 1, Assertions: 0, Failures: 0, Errors: 0
+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+
| benchmark | subject   | set                        | revs  | its | mem_peak | mode    | rstdev |
+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+
| MainBench | benchMake | without constructor        | 10000 | 10  | 6.310mb  | 1.596μs | ±4.71% |
| MainBench | benchMake | with empty constructor     | 10000 | 10  | 6.321mb  | 3.716μs | ±1.95% |
| MainBench | benchMake | with not empty constructor | 10000 | 10  | 6.329mb  | 8.871μs | ±2.26% |
+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+
samdark commented 3 years ago

My result:

+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+
| benchmark | subject   | set                        | revs  | its | mem_peak | mode    | rstdev |
+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+
| MainBench | benchMake | without constructor        | 10000 | 10  | 4.115mb  | 0.771μs | ±2.96% |
| MainBench | benchMake | with empty constructor     | 10000 | 10  | 4.118mb  | 2.144μs | ±3.06% |
| MainBench | benchMake | with not empty constructor | 10000 | 10  | 4.124mb  | 5.031μs | ±2.22% |
+-----------+-----------+----------------------------+-------+-----+----------+---------+--------+