Skip to content

Commit a1029ad

Browse files
committed
Profiler v2
1 parent d6713c2 commit a1029ad

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ It helps to add profiler to your php-project easy.
77

88
##### Features:
99
- Easy to implement.
10-
- Written on PHP.
1110
- Has 'counter' and 'timer' tools.
1211
- Has grouping for compare elements.
12+
- Support anonymous function.
13+
- Written on PHP.
1314

1415
### 1. How to add the profiler to you project
1516

1617
All you need is open your 'autoload' function, and use the profiler's function for loading class.
1718

1819
```php
19-
\SimpleProfiler\Profiler::loadFile(string $classPath, bool $inject_profiler = true) : void`
20+
\SimpleProfiler\Profiler::loadFile(string $classPath, bool $inject_profiler = true) : void
2021
```
2122

2223
Example:
@@ -52,7 +53,7 @@ The Profiler has 2 methods that returns semi-raw collected data, that you can us
5253

5354
`\SimpleProfiler\Profiler::getCounterStat() : array`
5455

55-
You can use function `\SimpleProfiler\Profiler::getLog` for already getting formatted log data.
56+
You can use function `\SimpleProfiler\Profiler::getLog` for getting already formatted log data.
5657

5758
Example of output:
5859
```
@@ -99,6 +100,8 @@ Example of output:
99100
> Some_event : 3
100101
```
101102

103+
Note. Calculation of `cost` does not accounting nested function, it just uses sum time of elements in a group.
104+
102105
### Usage
103106

104107
1. Using timers tool
@@ -974,6 +977,10 @@ $response->addHTML('<pre>' . \SimpleProfiler\Profiler::getLog() . '</pre>');
974977
cost: [] 0.2 %
975978
```
976979

980+
### TODO
981+
982+
I want to add accounting of nested functions for calculation correct cost percentage.
983+
977984
### Composer
978985

979986
Download composer:

0 commit comments

Comments
 (0)