Hrtime and Loops
![](/images/2021-12-18/loop10_hu481eb26ad579b166424e30b8a5e2b1a3_43917_300x300_fit_box_3.png)
PHPBench currently samples the time taken (in microseconds) to run code around a loop.
This post aims to provide some insight into:
If there is a benefit to using a loop (@Revs) when taking a time sample. The value of using hrtime instead of microtime. Background ¶ PHPBench samples the time taken for your code to run. The default executor does this by iterating over your code a number of times (@Revs) and dividing the total time in microseconds (i.
Read more...