File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -189,13 +189,13 @@ measure_memory(function() {
189189Or:
190190
191191``` php
192- $timing = \Binarcode\LaravelDeveloper\Profiling\ServerTiming::startWithoutKey ();
192+ $memory = \Binarcode\LaravelDeveloper\Profiling\ServerMemory::measure ();
193193
194- sleep(1);
194+ // some code memory consuming
195195
196- $timing->stopAllUnfinishedEvents ();
196+ $memory->stop ();
197197
198- $timing->getDuration ();
198+ $memory->getMemory ();
199199```
200200
201201And time measure:
@@ -209,13 +209,13 @@ measure_timing(function() {
209209Or:
210210
211211``` php
212- $memory = \Binarcode\LaravelDeveloper\Profiling\ServerMemory::measure ();
212+ $timing = \Binarcode\LaravelDeveloper\Profiling\ServerTiming::startWithoutKey ();
213213
214- // some code memory consuming
214+ sleep(1);
215215
216- $memory->stop ();
216+ $timing->stopAllUnfinishedEvents ();
217217
218- $memory->getMemory ();
218+ $timing->getDuration ();
219219```
220220
221221## Testing
You can’t perform that action at this time.
0 commit comments