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)
| 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): |