MCPcopy Index your code
hub / github.com/prometheus/client_python / merge

Method merge

prometheus_client/multiprocess.py:36–44  ·  view source on GitHub ↗

Merge metrics from given mmap files. By default, histograms are accumulated, as per prometheus wire format. But if writing the merged data back to mmap files, use accumulate=False to avoid compound accumulation.

(files, accumulate=True)

Source from the content-addressed store, hash-verified

34
35 @staticmethod
36 def merge(files, accumulate=True):
37 """Merge metrics from given mmap files.
38
39 By default, histograms are accumulated, as per prometheus wire format.
40 But if writing the merged data back to mmap files, use
41 accumulate=False to avoid compound accumulation.
42 """
43 metrics = MultiProcessCollector._read_metrics(files)
44 return MultiProcessCollector._accumulate_metrics(metrics, accumulate)
45
46 @staticmethod
47 def _read_metrics(files):

Callers 15

collectMethod · 0.95
fFunction · 0.80
yFunction · 0.80
MFunction · 0.80
sFunction · 0.80
oFunction · 0.80
rFunction · 0.80

Calls 2

_read_metricsMethod · 0.80
_accumulate_metricsMethod · 0.80