|
1 | 1 | **ApplicationPerformanceMonitor**
|
2 | 2 |
|
3 | 3 | Monitors the Performance of the Application
|
| 4 | + |
| 5 | +To configure, edit app/etc/env.php |
| 6 | +Add these lines. |
| 7 | + |
| 8 | +``` |
| 9 | +'application' => [ |
| 10 | + 'performance_monitor' => [ |
| 11 | + 'logger_output_enable' => 1, |
| 12 | + 'logger_output_verbose' => 0, |
| 13 | + ] |
| 14 | +] |
| 15 | +``` |
| 16 | + |
| 17 | +Use 0 or 1 as the value to enable or disable. |
| 18 | +Both `logger_output_enable` and `logger_output_verbose` default to 0. |
| 19 | + |
| 20 | +The option `logger_output_enable` enables outputting performance metrics to the logger using `debug` method of logger. |
| 21 | +The option `logger_output_verbose` adds additional metrics. |
| 22 | + |
| 23 | +Example output in log file without verbose: |
| 24 | +``` |
| 25 | +[2023-10-04T20:48:23.727037+00:00] report.ERROR: "Profile information": { |
| 26 | + "applicationClass": "Magento\ApplicationServer\App\Application\Interceptor", |
| 27 | + "applicationServer": "1", |
| 28 | + "threadPreviousRequestCount": "73", |
| 29 | + "memoryUsageAfter": "240 MB", |
| 30 | + "memoryUsageAfterComparedToPrevious": "0 B", |
| 31 | + "memoryUsageDelta": "118 KB", |
| 32 | + "peakMemoryUsageAfter": "243 MB", |
| 33 | + "peakMemoryUsageDelta": "0 B", |
| 34 | + "wallTimeElapsed": "0 s" |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +Example output in log file with verbose: |
| 39 | +``` |
| 40 | +[2023-10-04T20:55:31.174304+00:00] report.ERROR: "Profile information": { |
| 41 | + "applicationClass": "Magento\ApplicationServer\App\Application\Interceptor", |
| 42 | + "applicationServer": "1", |
| 43 | + "threadPreviousRequestCount": "42", |
| 44 | + "memoryUsageBefore": "239568640 B", |
| 45 | + "memoryUsageAfter": "239686808 B", |
| 46 | + "memoryUsageAfterComparedToPrevious": "0 B", |
| 47 | + "memoryUsageDelta": "118168 B", |
| 48 | + "peakMemoryUsageBefore": "243053632 B", |
| 49 | + "peakMemoryUsageAfter": "243053632 B", |
| 50 | + "peakMemoryUsageDelta": "0 B", |
| 51 | + "wallTimeBefore": "2023-10-04T20:55:31.170300", |
| 52 | + "wallTimeAfter": "2023-10-04T20:55:31.174200", |
| 53 | + "wallTimeElapsed": "0.0038700103759766 s", |
| 54 | + "userTimeBefore": "3.771626 s", |
| 55 | + "userTimeAfter": "3.771626 s", |
| 56 | + "userTimeElapsed": "0 s", |
| 57 | + "systemTimeBefore": "0.095585 s", |
| 58 | + "systemTimeAfter": "0.099126 s", |
| 59 | + "systemTimeElapsed": "0.003541 s" |
| 60 | +} |
| 61 | +``` |
| 62 | + |
| 63 | +The additional options `newrelic_output_enable` and `newrelic_output_verbose` are only used if ApplicationPerformanceMonitorNewRelic module is also installed and enabled. |
| 64 | +See README.md in ApplicationPerformanceMonitorNewRelic for more details on that. |
0 commit comments