Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most property math aggregations aren't implemented #26982

Closed
danielbachhuber opened this issue Dec 17, 2024 · 0 comments · Fixed by #27133
Closed

Most property math aggregations aren't implemented #26982

danielbachhuber opened this issue Dec 17, 2024 · 0 comments · Fixed by #27133
Assignees
Labels
bug Something isn't working right feature/experimentation Feature Tag: Experimentation

Comments

@danielbachhuber
Copy link
Contributor

The following operations simply return the sum:

  • min
  • max
  • median
  • p90
  • p95
  • p99

See:

@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_min(self):
self._test_query_runner_property_math(
math="min",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)
@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_max(self):
self._test_query_runner_property_math(
math="max",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)
@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_median(self):
self._test_query_runner_property_math(
math="median",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)
@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_p90(self):
self._test_query_runner_property_math(
math="p90",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)
@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_p95(self):
self._test_query_runner_property_math(
math="p95",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)
@freeze_time("2020-01-01T12:00:00Z")
def test_query_runner_property_math_p99(self):
self._test_query_runner_property_math(
math="p99",
expected_control={
"count": 5,
"absolute_exposure": 5,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
},
expected_test={
"count": 10,
"absolute_exposure": 10,
"data": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 10.0, 10.0, 10.0, 10.0],
},
)

From #26952

Done is:

  • These operations return their expected values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right feature/experimentation Feature Tag: Experimentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant