Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-10-06 (15 days ago) ![]() | Not yet rated by the users | Total: 28 This week: 1 | All time: 10,933 This week: 119![]() |
Version | License | PHP version | Categories | |||
profiler-php 1.0 | MIT/X Consortium ... | 7 | Time and Date, Performance and optimi..., P... |
Description | Author | |
This package can measure the elapsed time between PHP code sections. |
Profiler helper
composer require smoren/profiler
composer install
composer test-init
composer test
use Smoren\Profiler\Profiler;
function someTask()
{
Profiler::start('first');
usleep(10000);
Profiler::stop('first');
Profiler::start('second');
usleep(20000);
Profiler::stop('second');
}
for($i=0; $i<10; ++$i) {
someTask();
}
Profiler::profile('third', function() {
usleep(30000);
});
print_r(Profiler::getStatTime());
/*
Array
(
[second] => 0.2015209197998
[third] => 0.20024418830872
[first] => 0.10135746002197
)
*/
print_r(Profiler::getStatCalls());
/*
Array
(
[first] => 10
[second] => 10
[third] => 1
)
*/
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | src |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
/ | tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Aux. | Auxiliary script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.