(sample, name, typ)
| 380 | |
| 381 | |
| 382 | def _group_for_sample(sample, name, typ): |
| 383 | if typ == 'info': |
| 384 | # We can't distinguish between groups for info metrics. |
| 385 | return {} |
| 386 | if typ == 'summary' and sample.name == name: |
| 387 | d = sample.labels.copy() |
| 388 | del d['quantile'] |
| 389 | return d |
| 390 | if typ == 'stateset': |
| 391 | d = sample.labels.copy() |
| 392 | del d[name] |
| 393 | return d |
| 394 | if typ in ['histogram', 'gaugehistogram'] and sample.name == name + '_bucket': |
| 395 | d = sample.labels.copy() |
| 396 | del d['le'] |
| 397 | return d |
| 398 | return sample.labels |
| 399 | |
| 400 | |
| 401 | def _check_histogram(samples, name): |
no outgoing calls
no test coverage detected