<commit_before>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:
    * set the relative path of your library,
    * set the path of your front controller,
    * instantiate the profiler with the path of the front controller, the relative path of the file and a queries' array.

Be attentive, the array must respect the following form:

```php
<?php
$queriesArray = array(
    array(
        'time'  => 0.0008,
        'query' => 'SELECT myFiled FROM myTable;',
    ),
    array(
        'time'  => 0.0010,
        'query' => 'SELECT myFiled 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);
```

... and call his display method:

```php
<?php

echo $profiler->display();
```

## License

Profiler is licensed under the MIT license.<commit_msg>Edited README.md via GitHub<commit_after>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
<?php

$queriesArray = array(
    array(
        'time'  => 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
<?php

echo $profiler->display();
```

## License

Profiler is licensed under the MIT license.
{'fraction_non_alphanumeric': 0.11855442926399296, 'fraction_numerical': 0.011018069634200088, 'mean_word_length': 3.7489539748953975, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1285717', 'n_tokens_mistral': 707, 'n_tokens_neox': 685, 'n_words': 250}