8000 Reworded the article about profiler storage by javiereguiluz · Pull Request #6090 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Reworded the article about profiler storage #6090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ProfilerStorage configuration
The ProfilerStorage other than FileProfilerStorage have been removed in this PR : symfony/symfony#16018
  • Loading branch information
xavierleune committed Dec 16, 2015
commit 32a63d80bc0b117c79968db3956682d933afb8b0
64 changes: 2 additions & 62 deletions cookbook/profiler/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,5 @@ Switching the Profiler Storage
==============================

By default the profile stores the collected data in files in the ``%kernel.cache_dir%/profiler/`` directory.
You can control the storage being used through the ``dsn``, ``username``,
``password`` and ``lifetime`` options. For example, the following configuration
uses MySQL as the storage for the profiler with a lifetime of one hour:

.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
framework:
profiler:
dsn: 'mysql:host=localhost;dbname=%database_name%'
username: '%database_user%'
password: '%database_password%'
lifetime: 3600

.. code-block:: xml

<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
>
<framework:config>
<framework:profiler
dsn="mysql:host=localhost;dbname=%database_name%"
username="%database_user%"
password="%database_password%"
lifetime="3600"
/>
</framework:config>
</container>

.. code-block:: php

// app/config/config.php

// ...
$container->loadFromExtension('framework', array(
'profiler' => array(
'dsn' => 'mysql:host=localhost;dbname=%database_name%',
'username' => '%database_user',
'password' => '%database_password%',
'lifetime' => 3600,
),
));

The :doc:`HttpKernel component </components/http_kernel/introduction>` currently
supports the following profiler storage drivers:

* file
* sqlite
* mysql
* mongodb
* memcache
* memcached
* redis
You can control the storage by implementing the ``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` in
your own service and override the ``profiler.storage`` service.
0