1

I'm having trouble to configure the profiler in Magento 2 (version 1.0.0-beta). I want to apply a specific configuration, I want to set a timer threshold to 0 because the default settings prevent from seeing timer below 0.001s.

$config = [
    'baseDir' => BP,
    'drivers' => [
        ['output' =>
            [
                'type' => 'html',
                ['thresholds' => ['sum' => 0.00000001]],
            ]
        ]
    ],
    'driverFactory'
];
Magento\Framework\Profiler::applyConfig($config, BP);

Can someone help me with that ?

Thanks !

0

I finally found the right configuration options.

$config = [
    'drivers' => [
        [
            'output' => [
                'type' => 'html',
                'thresholds' => [
                    'sum' => 0.0000001
                ]
            ]
        ]
    ],
    'driverFactory'
];
Magento\Framework\Profiler::applyConfig($config, BP);

By submitting this array, I'm asking the profiler to display the result in HTML format with a threshold of min time of 0.0000001s of execution.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.