Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djlechuck/profiler
Profiler is a standalone package to profile your code.
https://github.com/djlechuck/profiler
Last synced: about 2 months ago
JSON representation
Profiler is a standalone package to profile your code.
- Host: GitHub
- URL: https://github.com/djlechuck/profiler
- Owner: DjLeChuck
- License: mit
- Created: 2011-09-30T23:07:56.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-03T21:02:12.000Z (over 13 years ago)
- Last Synced: 2023-04-22T17:30:22.269Z (over 1 year ago)
- Language: PHP
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Profiler
========Profiler is a standalone package to profile your code.
## Installation
Just download and extract the package. Configures.
## Configuration
All you have to do is to:
1. set the relative path of your library,
2. set the path of your front controller,
3. instantiate the profiler with the path of the front controller, the relative path of the file and a queries' array.Be careful, the array must respect the following skeleton:
```php
0.0008,
'query' => 'SELECT myField FROM myTable;',
),
array(
'time' => 0.0010,
'query' => 'SELECT myField FROM myTable WHERE myField > 2;',
),
);$libraryPath = './libraries/Profiler/';
$frontControllerPath = str_replace(pathinfo(__FILE__, PATHINFO_BASENAME), '', __FILE__);
require_once $libraryPath.'Profiler.php';$profiler = new Profiler($frontControllerPath, $libraryPath, $queriesArray);
```At last, call its display method:
```php
display();
```## License
Profiler is licensed under the MIT license.