@@ -36,17 +36,17 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
3636``` php
3737use DragonCode\Benchmark\Benchmark;
3838
39- (new Benchmark() )->compare(
39+ Benchmark::start( )->compare(
4040 fn () => /* some code */,
4141 fn () => /* some code */,
4242);
4343
44- (new Benchmark() )->compare([
44+ Benchmark::start( )->compare([
4545 fn () => /* some code */,
4646 fn () => /* some code */,
4747]);
4848
49- (new Benchmark() )->compare([
49+ Benchmark::start( )->compare([
5050 'foo' => fn () => /* some code */,
5151 'bar' => fn () => /* some code */,
5252]);
@@ -92,7 +92,7 @@ the `iterations` method:
9292``` php
9393use DragonCode\Benchmark\Benchmark;
9494
95- (new Benchmark() )
95+ Benchmark::start( )
9696 ->iterations(5)
9797 ->compare(
9898 fn () => /* some code */,
@@ -126,7 +126,7 @@ You can also get the number of the current execution iteration from the input pa
126126``` php
127127use DragonCode\Benchmark\Benchmark;
128128
129- (new Benchmark() )
129+ Benchmark::start( )
130130 ->iterations(5)
131131 ->compare(
132132 fn (int $iteration) => /* some code */,
@@ -143,7 +143,7 @@ summary information:
143143``` php
144144use DragonCode\Benchmark\Benchmark;
145145
146- (new Benchmark() )
146+ Benchmark::start( )
147147 ->withoutData()
148148 ->compare([
149149 'foo' => fn () => /* some code */,
@@ -183,7 +183,7 @@ For example:
183183``` php
184184use DragonCode\Benchmark\Benchmark;
185185
186- (new Benchmark() )
186+ Benchmark::start( )
187187 ->iterations(5)
188188 ->round(2)
189189 ->compare(
@@ -222,7 +222,7 @@ There is a `prepare` method for this:
222222``` php
223223use DragonCode\Benchmark\Benchmark;
224224
225- (new Benchmark() )
225+ Benchmark::start( )
226226 ->prepare(fn () => /* some code */)
227227 ->compare(
228228 fn () => /* some code */,
@@ -236,7 +236,7 @@ inside the callback function.
236236``` php
237237use DragonCode\Benchmark\Benchmark;
238238
239- (new Benchmark() )
239+ Benchmark::start( )
240240 ->prepare(fn (mixed $name, int $iteration) => /* some code */)
241241 ->compare(
242242 fn () => /* some code */,
@@ -250,7 +250,7 @@ the input parameter:
250250``` php
251251use DragonCode\Benchmark\Benchmark;
252252
253- (new Benchmark() )
253+ Benchmark::start( )
254254 ->prepare(fn (mixed $name, int $iteration) => /* some code */)
255255 ->compare(
256256 fn (int $iteration, mixed $prepareResult) => /* some code */,
0 commit comments