You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msgid"Registers a new summary. Quantile computation is based on the algorithm `\"Effective computation of biased quantiles over data streams\" <https://ieeexplore.ieee.org/document/1410103>`_"
140
140
msgstr""
141
141
142
-
msgid"Quantiles to observe in the form ``{quantile = error, ... }``. For example: ``{[0.5]=0.01, [0.9]=0.01, [0.99]=0.01}``"
142
+
msgid"A list of 'targeted' φ-quantiles in the form ``{quantile = error, ... }``. For example: ``{[0.5]=0.01, [0.9]=0.01, [0.99]=0.01}``. A targeted φ-quantile is specified in the form of a φ-quantile and tolerated error. For example a ``{[0.5] = 0.1}`` means that the median (= 50th percentile) should be returned with 10 percent error. Note that percentiles and quantiles are the same concept, except percentiles are expressed as percentages. The φ-quantile must be in the interval [0, 1]. Note that a lower tolerated error for a φ-quantile results in higher usage of resources (memory and CPU) to calculate the summary."
143
+
msgstr""
144
+
145
+
msgid"Table of summary parameters, used for configuring sliding window of time. 'Sliding window' consists of several buckets to store observations. New observations are added to each bucket. After a time period, the 'head' bucket (bucket from which observations are collected) is reset and the next bucket becomes a new 'head'. I.e. each bucket will store observations for ``max_age_time * age_buckets_count`` seconds before it will be reset. ``max_age_time`` sets the duration of each bucket lifetime, i.e., how long observations are kept before they are discarded, in seconds ``age_buckets_count`` sets the number of buckets of the time window. It determines the number of buckets used to exclude observations that are older than ``max_age_time`` from the Summary. The value is a trade-off between resources (memory and CPU for maintaining the bucket) and how smooth the time window is moved. Default value is `{max_age_time = math.huge, age_buckets_count = 1}`"
143
146
msgstr""
144
147
145
148
msgid"Summary object"
@@ -163,7 +166,10 @@ msgstr ""
163
166
msgid"Value to put in the data stream."
164
167
msgstr""
165
168
166
-
msgid"Returns a concatenation of ``counter_obj:collect()`` across all internal counters of ``summary_obj``. For ``observation`` description, see :ref:`counter_obj:collect() <counter-collect>`."
169
+
msgid"A table containing label names as keys, label values as values (table). A new value is observed by all internal counters with these labels specified. Label ``\"quantile\"`` are not allowed in ``summary``. It will be added automatically. If ``max_age_time`` and ``age_buckets_count`` are set, the observed value will be added to each bucket."
170
+
msgstr""
171
+
172
+
msgid"Returns a concatenation of ``counter_obj:collect()`` across all internal counters of ``summary_obj``. For ``observation`` description, see :ref:`counter_obj:collect() <counter-collect>`. If ``max_age_time`` and ``age_buckets_count`` are set, quantile observations will be collect only from the head bucket in sliding window and not from every bucket."
Copy file name to clipboardExpand all lines: doc/monitoring/api_reference.rst
+37-6
Original file line number
Diff line number
Diff line change
@@ -162,12 +162,35 @@ Summary
162
162
163
163
.. function:: summary(name [, help, objectives])
164
164
165
-
Registers a new summary. Quantile computation is based on the algorithm `"Effective computation of biased quantiles over data streams" <https://ieeexplore.ieee.org/document/1410103>`_
165
+
Registers a new summary. Quantile computation is based on the algorithm
166
+
`"Effective computation of biased quantiles over data streams" <https://ieeexplore.ieee.org/document/1410103>`_
166
167
167
168
:param string name: Collector name. Must be unique.
168
169
:param string help: Help description.
169
-
:param table objectives: Quantiles to observe in the form ``{quantile = error, ... }``.
170
-
For example: ``{[0.5]=0.01, [0.9]=0.01, [0.99]=0.01}``
170
+
:param table objectives: A list of 'targeted' φ-quantiles in the form ``{quantile = error, ... }``.
171
+
For example: ``{[0.5]=0.01, [0.9]=0.01, [0.99]=0.01}``.
172
+
A targeted φ-quantile is specified in the form of a φ-quantile and tolerated
173
+
error. For example a ``{[0.5] = 0.1}`` means that the median (= 50th
174
+
percentile) should be returned with 10 percent error. Note that
175
+
percentiles and quantiles are the same concept, except percentiles are
176
+
expressed as percentages. The φ-quantile must be in the interval [0, 1].
177
+
Note that a lower tolerated error for a φ-quantile results in higher
178
+
usage of resources (memory and CPU) to calculate the summary.
179
+
180
+
:param table params: Table of summary parameters, used for configuring sliding
181
+
window of time. 'Sliding window' consists of several buckets to store observations.
182
+
New observations are added to each bucket. After a time period, the 'head' bucket
183
+
(bucket from which observations are collected) is reset and the next bucket becomes a
184
+
new 'head'. I.e. each bucket will store observations for
185
+
``max_age_time * age_buckets_count`` seconds before it will be reset.
186
+
``max_age_time`` sets the duration of each bucket lifetime, i.e., how long
187
+
observations are kept before they are discarded, in seconds
188
+
``age_buckets_count`` sets the number of buckets of the time window. It
189
+
determines the number of buckets used to exclude observations that are
190
+
older than ``max_age_time`` from the Summary. The value is
191
+
a trade-off between resources (memory and CPU for maintaining the bucket)
192
+
and how smooth the time window is moved.
193
+
Default value is `{max_age_time = math.huge, age_buckets_count = 1}`
171
194
172
195
:return: Summary object
173
196
@@ -190,16 +213,23 @@ Summary
190
213
Records a new value in a summary.
191
214
192
215
:param number num: Value to put in the data stream.
193
-
:param table label_pairs:Table containing label names as keys,
216
+
:param table label_pairs:A table containing label names as keys,
194
217
label values as values (table).
195
218
A new value is observed by all internal counters
196
219
with these labels specified.
220
+
Label ``"quantile"`` are not allowed in ``summary``.
221
+
It will be added automatically.
222
+
If ``max_age_time`` and ``age_buckets_count`` are set,
223
+
the observed value will be added to each bucket.
197
224
198
225
.. method:: collect()
199
226
200
227
Returns a concatenation of ``counter_obj:collect()`` across all internal
201
228
counters of ``summary_obj``. For ``observation`` description,
202
229
see :ref:`counter_obj:collect() <counter-collect>`.
230
+
If ``max_age_time`` and ``age_buckets_count`` are set, quantile observations
231
+
will be collect only from the head bucket in sliding window and not from every
232
+
bucket.
203
233
204
234
.. _labels:
205
235
@@ -452,10 +482,11 @@ Using summaries:
452
482
453
483
local metrics = require('metrics')
454
484
455
-
-- create a summary
485
+
-- create a summary with a window of 5 age buckets and 60s bucket lifetime
0 commit comments