Skip to content

Commit 2f02505

Browse files
committed
docs
1 parent fc04aa5 commit 2f02505

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,18 @@ measure_memory(function() {
186186
});
187187
```
188188

189+
Or:
190+
191+
```php
192+
$timing = \Binarcode\LaravelDeveloper\Profiling\ServerTiming::startWithoutKey();
193+
194+
sleep(1);
195+
196+
$timing->stopAllUnfinishedEvents();
197+
198+
$timing->getDuration();
199+
```
200+
189201
And time measure:
190202

191203
```php
@@ -194,6 +206,18 @@ measure_timing(function() {
194206
})
195207
```
196208

209+
Or:
210+
211+
```php
212+
$memory = \Binarcode\LaravelDeveloper\Profiling\ServerMemory::measure();
213+
214+
// some code memory consuming
215+
216+
$memory->stop();
217+
218+
$memory->getMemory();
219+
```
220+
197221
## Testing
198222

199223
``` bash

0 commit comments

Comments
 (0)