leninworld opened a new pull request, #41710: URL: https://github.com/apache/beam/pull/41710
Fixes #41709 `HistogramResult.p95` calls `self.data.histogram.p95()`, but `Histogram` had no `p95()` method, so reading `.p95` on a histogram metric result raised `AttributeError`. This adds `Histogram.p95()` next to `p50()`/`p90()`/`p99()`, using the same `get_linear_interpolation` call. ### Testing - Added `HistogramTest.test_p95` (`apache_beam/utils/histogram_test.py`) and `TestHistogramCell.test_result_p95` (`apache_beam/metrics/cells_test.py`, the `HistogramResult.p95` path). Both fail on `master` with `AttributeError: 'Histogram' object has no attribute 'p95'` and pass with the fix. - `pytest apache_beam/metrics apache_beam/utils/histogram_test.py`: 91 passed. - `yapf --diff` (0.43.0), `ruff check` (0.17.6) and `whitespacelint` are clean on the changed files. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
