MeasureReport evaluates its periods together
This commit is contained in:
+3
-2
@@ -385,8 +385,9 @@ def search_measure_report(
|
||||
raise HTTPException(422, f"reporting-period: {e}") from e
|
||||
rows = measure_reads.rows(domain.value, found.rows, **found.params)
|
||||
reports = []
|
||||
for text, period in _sliced(asked, count, offset):
|
||||
result = m.evaluate(found, rows, period, as_of, event_cutoff)
|
||||
page = _sliced(asked, count, offset)
|
||||
results = m.evaluate_periods(found, rows, [p for _, p in page], as_of, event_cutoff)
|
||||
for (text, period), result in zip(page, results, strict=True):
|
||||
report = m.report(found, period, result, as_of)
|
||||
report.id = f"{f.measure_id(found.id)}-{text.lower()}"
|
||||
reports.append(report)
|
||||
|
||||
Reference in New Issue
Block a user