File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -473,6 +473,52 @@ To get the Profiler for the last request, do the following::
473
473
For specific details on using the profiler inside a test, see the
474
474
:doc: `/cookbook/testing/profiling ` cookbook entry.
475
475
476
+ To avoid collecting data in each test you can set the ``collect `` parameter
477
+ in the configuration:
478
+
479
+ .. configuration-block ::
480
+
481
+ .. code-block :: yaml
482
+
483
+ # app/config/config_test.yml
484
+
485
+ # ...
486
+ framework :
487
+ profiler :
488
+ enabled : true
489
+ collect : false
490
+
491
+ .. code-block :: xml
492
+
493
+ <!-- app/config/config.xml -->
494
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
495
+ <container xmlns =" http://symfony.com/schema/dic/services"
496
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
497
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
498
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
499
+ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
500
+
501
+ <!-- ... -->
502
+
503
+ <framework : config >
504
+ <framework : profiler enabled =" true" collect =" false" />
505
+ </framework : config >
506
+ </container >
507
+
508
+ .. code-block :: php
509
+
510
+ // app/config/config.php
511
+
512
+ // ...
513
+ $container->loadFromExtension('framework', array(
514
+ 'profiler' => array(
515
+ 'enabled' => true,
516
+ 'collect' => false,
517
+ ),
518
+ ));
519
+
520
+ In this way only tests that call ``enableProfiler() `` will collect data.
521
+
476
522
Redirecting
477
523
~~~~~~~~~~~
478
524
You can’t perform that action at this time.
0 commit comments