Turn profiling on or off
--profile state
object
profile
turns profiling
on or off for different objects.
Note: Activating profiling has a negative impact on performance. |
In some circumstances, worker_2.pid
may
be present when worker_1.pid
is not. This is a
strong indication that worker_1
stopped and was
restarted automatically. You can confirm this by checking the main
log file.
When profiling is activated, messages similar to the following are included in the log.
12 [2014.02.27 10:13:28.075126] [profile] [SERVICE:http-connection] [endpoint:[::]:9910] [client:163.72.158.2:57611] [request-id:0:1:5] [type:arrive] [component:mymagic] [function:magic] Request arrived and was placed in the queue 13 [2014.02.27 10:13:28.087752] [profile] [SERVICE:http-connection] [endpoint:[::]:9910] [client:163.72.158.2:57611] [request-id:0:1:5] [type:start] [worker:3] Request started executing on worker-3 ... 15 [2014.02.27 10:13:31.397266] [profile] [SERVICE:http-connection] [endpoint:[::]:9910] [client:163.72.158.2:57611] [request-id:0:1:5] [type:finish] [status:200] Request completed with HTTP status 200
state
Specifies if profiling is active. Valid values are:
on
— Activate profiling.
off
— Activate profiling.
object
The list of objects to change. Supported objects are:
requests
worker_pool
If no object is specified, all objects are changed.
Turn on request profiling.
--profile on requests
Turn on profiling for all objects.
--profile on