File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff 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
1617All 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
2223Example:
@@ -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
5758Example 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
1041071 . 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
979986Download composer:
You can’t perform that action at this time.
0 commit comments