@@ -24,7 +24,7 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
2424``` json
2525{
2626 "require-dev" : {
27- "dragon-code/benchmark" : " ^3 .0"
27+ "dragon-code/benchmark" : " ^4 .0"
2828 }
2929}
3030```
@@ -136,45 +136,6 @@ Benchmark::start()
136136 );
137137```
138138
139- ### Without Data
140-
141- If you want to see only the summary result of the run time without detailed information for each iteration, then you can
142- call the ` withoutData ` method, which will display only the
143- summary information:
144-
145- ``` php
146- use DragonCode\Benchmark\Benchmark;
147-
148- Benchmark::start()
149- ->withoutData()
150- ->compare([
151- 'foo' => fn () => /* some code */,
152- 'bar' => fn () => /* some code */,
153- ]);
154- ```
155-
156- Result example:
157-
158- ```
159- ------- ------------------- -------------------
160- # foo bar
161- ------- ------------------- -------------------
162- min 12.02 ms - 58.4Kb 14.71 ms - 55.4Kb
163- max 15.66 ms - 64.8Kb 15.67 ms - 57.3Kb
164- avg 14.65 ms - 60.1Kb 15.17 ms - 56.2Kb
165- total 73.93 ms 76.31 ms
166- ------- ------------------- -------------------
167- Order - 1 - - 2 -
168- ------- ------------------- -------------------
169- ```
170-
171- > Note
172- >
173- > If the option to display detailed information is enabled (without using the ` withoutData ` method) and more than 1000
174- > iterations are requested, then the output of detailed
175- > information will be forcibly disabled, since there will be absolutely no point in it with a significantly increasing
176- > load on the computer.
177-
178139### Round Precision
179140
180141By default, the script does not round measurement results, but you can specify the number of decimal places to which
0 commit comments