<commit_before>Artisan Debug Profiler for Laravel 4
==============

`Orchestra\Debug` is commandline profiling package for Laravel 4, It was based from Laravel 4.1 commandline profiling tool which was merged with `php artisan tail`.

[![Latest Stable Version](https://poser.pugx.org/orchestra/debug/v/stable.png)](https://packagist.org/packages/orchestra/debug) 
[![Total Downloads](https://poser.pugx.org/orchestra/debug/downloads.png)](https://packagist.org/packages/orchestra/debug) 
[![Build Status](https://travis-ci.org/orchestral/debug.png?branch=2.0)](https://travis-ci.org/orchestral/debug) 
[![Coverage Status](https://coveralls.io/repos/orchestral/debug/badge.png?branch=2.0)](https://coveralls.io/r/orchestral/debug?branch=2.0) 
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/orchestral/debug/badges/quality-score.png?s=126736312eb50230c0a9216f032def44610f1647)](https://scrutinizer-ci.com/g/orchestral/debug/) 

## Quick Installation

To install through composer, simply put the following in your `composer.json` file:

```json
{
	"require": {
		"orchestra/debug": "2.0.*"
	}
}
```

### Registering the Package

Next add the following service provider in `app/config/app.php`.

```php
'providers' => array(

	// ...
    
	'Orchestra\Debug\DebugServiceProvider',

	'Orchestra\Debug\CommandServiceProvider',
),
```
 
### Adding an Alias
 
You could also create an alias for `Orchestra\Debug\Facades\Profiler` in `app/config/app.php`.
 
```php
'alias' => array(
	'Profiler' => 'Orchestra\Debug\Facades\Profiler',
),
```

## Enabling Profiler

To enable the profiler, all you need to do is:

```php
Profiler::attachDebugger();
```

> This normally would goes in your development environment such as `local` environment, in the case `app/start/local.php` would be an ideal location to include the command.

### Viewing the Profiler

To view the profiler, run the following command in your terminal:

```bash
php artisan debug
```


 
 <commit_msg>Working on readme.<commit_after>Artisan Debug Profiler for Laravel
==============

Debug Component is commandline profiling package for Laravel, It was based from Laravel 4.1 commandline profiling tool which was merged with `php artisan tail`.

[![Latest Stable Version](https://img.shields.io/github/release/orchestral/debug.svg?style=flat)](https://packagist.org/packages/orchestra/debug)
[![Total Downloads](https://img.shields.io/packagist/dt/orchestra/debug.svg?style=flat)](https://packagist.org/packages/orchestra/debug)
[![MIT License](https://img.shields.io/packagist/l/orchestra/debug.svg?style=flat)](https://packagist.org/packages/orchestra/debug)
[![Build Status](https://img.shields.io/travis/orchestral/debug/2.0.svg?style=flat)](https://travis-ci.org/orchestral/debug)
[![Coverage Status](https://img.shields.io/coveralls/orchestral/debug/2.0.svg?style=flat)](https://coveralls.io/r/orchestral/debug?branch=2.0)
[![Scrutinizer Quality Score](https://img.shields.io/scrutinizer/g/orchestral/debug/2.0.svg?style=flat)](https://scrutinizer-ci.com/g/orchestral/debug/)

## Table of Content

* [Version Compatibility](#version-compatibility)
* [Installation](#installation)
* [Configuration](#configuration)
* [Usage](#usage)

## Version Compatibility

Laravel    | Debug
:----------|:----------
 4.0.x     | 2.0.x

## Installation

To install through composer, simply put the following in your `composer.json` file:

```json
{
	"require": {
		"orchestra/debug": "2.0.*"
	}
}
```

And then run `composer install` from the terminal.

### Quick Installation

Above installation can also be simplify by using the following command:

    composer require "orchestra/debug=2.0.*"

## Configuration

Add following service providers in `app/config/app.php`.

```php
'providers' => array(

	// ...

	'Orchestra\Debug\DebugServiceProvider',
	'Orchestra\Debug\CommandServiceProvider',
),
```

### Aliases

You could also create an alias for `Orchestra\Debug\Facades\Profiler` in `app/config/app.php`.

```php
'aliases' => array(

    // ...

	'Profiler' => 'Orchestra\Debug\Facades\Profiler',
),
```

## Usage

### Enabling Profiler

To enable the profiler, all you need to do is:

```php
Profiler::attachDebugger();
```

> This normally would goes in your development environment such as `local` environment, in the case `app/start/local.php` would be an ideal location to include the command.

### Viewing the Profiler

To view the profiler, run the following command in your terminal:

```bash
php artisan debug
```

{'fraction_non_alphanumeric': 0.16113215957209717, 'fraction_numerical': 0.013594829507466013, 'mean_word_length': 4.790967741935484, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 22, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '581779', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1504, 'n_words': 337}