This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
/
ezperformancelogger.ini
174 lines (144 loc) · 7.55 KB
/
ezperformancelogger.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[GeneralSettings]
# Variables to log. Array index is important for piwik/ga logging only
# Currently supported: mem_usage, execution_time, db_queries,
# unique_id (when Apache mod_unique_id is enabled), xhkprof_runs (when xhprof php extension is enabled)
# (using the included eZPerfLogger class, custom user-added variables are also possible)
# bytes, rounded to 1000 bytes (int)
TrackVariables[1]=mem_usage
# Note: Apache can log execution time by itself with the token %D
# seconds, rounded to 1msec (float)
TrackVariables[2]=execution_time
# Note: this one is only available when debug output is enabled
# (int)
TrackVariables[3]=db_queries
# More DB-related variables can logged if a customized db-connector class is used.
# In order to have them available you should uncomment the VariableProviders[]=eZMySQLiTracingXXDB
# line below
# mysqli_connection (# of db connections per page)
# mysqli_query (# of queries per page)
# mysqli_loop (# of selects per page)
# mysqli_conversion (# of charset conversion of select results per page)
# mysqli_connection_t (db connection time in seconds, rounded to ms)
# mysqli_query_t (time spent on queries, rounded to ms)
# mysqli_query_tmax (max time spent on a query, rounded to ms)
# mysqli_loop_t (time spent on selects, rounded to ms)
# mysqli_conversion_t (time spent on charset conversion of select results, rounded to ms)
#
# the same holds true for cluster-db variables and VariableProviders[]=eZDFSFileHandlerTracingXXMySQLiBackend
# mysql_cluster_query (# of cluster queries per page)
# mysql_cluster_query_t (total time spent on cluster queries, rounded to ms)
# mysql_cluster_query_tmax (max time spent on a cluster query, rounded to ms)
# A list of php classes used to provide performance variables and their values.
# At the end of every page execution, the static method measure() will be invoked on these
# classes, to allow them to set proper measured data for the custom variables defined above.
# Every class registered here should implement the eZPerfLoggerProvider interface.
# Note: for munin compatibility, variable names should contain only a-z A-Z 0-9 _
# see http://munin-monitoring.org/wiki/notes_on_datasource_names
VariableProviders[]
VariableProviders[]=eZPerfLogger
#VariableProviders[]=eZMySQLiTracing44DB
#VariableProviders[]=eZMySQLiTracing46DB
#VariableProviders[]=eZDFSFileHandlerTracing46MySQLiBackend
# How to log performance values:
# Many logging methods can be enabled at the same time
LogMethods[]
# adding info for Apache to put in its own log - needs some specific apache customlog format to work,
# see the example configuration in file doc/sample_httpd.conf
# (only works when running apache + mod_php, not cgi/fastcgi)
#LogMethods[]=apache
# by setting custom variables for common analytics engines:
# piwik: to make this work, you need a piwik js tag in your templates, including the "piwikTracker.trackPageView();" line
#LogMethods[]=piwik
# google analytics: to make this work, you need an async ga tag in your templates, including the "_gaq.push(['_trackPageview']);" line
#LogMethods[]=googleanalytics
# by logging directly to a custom log file - NB: more expensive than letting Apache do it
# (uses same log format as Apache "extended" one)
#LogMethods[]=logfile
# by logging directly to a csv-formatted file.
# The csv contains the perf. data first, then some useful http request info: date, cient ip, http status code, content length, url
LogMethods[]=csv
# by logging to syslog (on windows messages will be added to the Event Log)
# nb: syslog message format is currently the same as Apache extended log
#LogMethods[]=syslog
# not yet supported
# by inserting data directly in a custom table in the eZ database - be wary of its size!
#LogMethods[]=database
# The php classes which can be used to log the measured data.
# Every class listed here needs to implement the eZPerfLoggerLogger interface
LogProviders[]
LogProviders[]=eZPerfLogger
# Optional: logging filters
# Every php class registered here needs to implement the eZPerfLoggerFilter interface.
# If no logging filter is defined, performance data is logged on every poge.
# If filters are defined, perf. data is logged only when at least one filter class returns true
LogFilters[]
[logfileSettings]
# The name of the log file, for example mytest.log
# NB: this is used only by logging method "logfile" above.
# When logging method "apache" is used you should properly configure logfile.ini
FileName=var/log/ezperflog.log
# Whether to rotate the perf log files when running the "rotatelogs" cronjob or cli script
RotateFiles=enabled
# Max log file size (in bytes) before rotation happens. Defaults to 1MB
MaxLogSize=1048576
# How many logfiles to keep. Set to 0 to never remove
MaxLogrotateFiles=8
# The following settings apply when StorageClass=eZPerfLoggerCSVStorage or
# when LogMethods[]=csv
[csvSettings]
FileName=var/log/ezperflog.csv
# separator char for csv
Separator=;
# quotes around url field. Can be left empty
Quotes=
# Whether to rotate the perf log csv files when running the "rotatelogs" cronjob or cli script
RotateFiles=enabled
# The following settings apply in a 2-step scenario:
# 1. use "apache" or "logfile" in LogMethods
# 2. run the updateperfstats cronjob to parse the log file and store the retrieved data
# in some storage repository (currently supported: csv file)
[ParsingSettings]
# A list of regexps, used to find urls not to match when parsing the access log
ExcludeUrls[]
ExcludeUrls[]=/\.(css|gif|ico|js|jpe?g|png)$/
# The php class which will be used to store the perf data (typically in a db):
# when the updateperfstats cronjob is run, it parses the access log, extracts
# data and passes it to this class to storing elsewhere
# supported: eZPerfLoggerCSVStorage (in the future: eZPerfLoggerDBStorage)
# NB: when the LogMethod "database" is used (see parameter above), perf data
# is stored directly to the db just as if eZPerfLoggerDBStorage was used here.
# In fact, in that case you should not run the cronjob, as you will get double
# statistics
StorageClass=eZPerfLoggerCSVStorage
[MuninSettings]
# When using Munin to graph variables, extra info can be used to make the
# output nicer.
# See for details http://munin-monitoring.org/wiki/protocol-config
#
# For every variable tracked by eZPerformanceLogger, a dedicated Munin graph is
# shown, showing av, min and max values for it over the last 5 minutes.
#
# Use VariableDescription_<varname> for graph-generic params
# Use VariableDescription_<varname>_[avg|min|Max] for line-generic params
VariableDescription_mem_usage[graph_title]=Memory per page (bytes)
VariableDescription_mem_usage_avg[min]=0
VariableDescription_mem_usage_min[min]=0
VariableDescription_mem_usage_max[min]=0
VariableDescription_mem_usage_max[warning]=100000000
VariableDescription_execution_time[graph_title]=Execution time per page (seconds)
VariableDescription_execution_time_avg[min]=0
VariableDescription_execution_time_min[min]=0
VariableDescription_execution_time_max[min]=0
VariableDescription_db_queries[graph_title]=DB queries per page
VariableDescription_db_queries_avg[min]=0
VariableDescription_db_queries_min[min]=0
VariableDescription_db_queries_max[min]=0
# Besides logging data, we can enable xhprof to get complete profiling info
# NB: needs the xhprof PECL extension to work
[XHProfSettings]
# when this is enabled, and any code starts an xhprof session, an html comment is
# added to the bottom of the page with the profiling session ids. This is used to
# show a link in the debug output panel to view the profiling data
AppendXHProfTag=enabled
# Location of the dot command from graphviz (full path), if not in the system PATH
DotCommand=dot