This commit is contained in:
Anna Scholtz 2023-01-23 10:09:48 -08:00
Родитель 73148e3d6e
Коммит 7785257019
3 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -371,7 +371,7 @@ def backfill(
continue
# resolve config by applying platform and custom config specs
spec = MonitoringSpec.from_definition_spec(copy.deepcopy(platform_definitions.spec))
spec = MonitoringSpec.from_definition_spec(copy.deepcopy(platform_definitions))
platform_defaults = ConfigLoader.configs.get_platform_defaults(platform)
if platform_defaults is not None:
spec.merge(platform_defaults)
@ -487,13 +487,14 @@ def preview(
if start_date is None and end_date is None:
start_date = datetime.today() - timedelta(days=3)
end_date = datetime.today() - timedelta(days=1)
start_date = pytz.utc.localize(start_date)
end_date = pytz.utc.localize(end_date)
elif start_date is None:
start_date = end_date - timedelta(days=3)
else:
start_date = pytz.utc.localize(start_date)
elif end_date is None:
end_date = start_date + timedelta(days=3)
start_date = pytz.utc.localize(start_date)
end_date = pytz.utc.localize(end_date)
end_date = pytz.utc.localize(end_date)
table = bq_normalize_name(slug)

Просмотреть файл

@ -174,7 +174,7 @@ class Percentile(Statistic):
def _scalar_compute(self, metric: Metric):
return f"""
jackknife_percentile_ci(
`moz-fx-data-shared-prod.udf_js.bootstrap_percentile_ci`(
{self.percentiles},
merge_histogram_values(
ARRAY_CONCAT_AGG(
@ -200,7 +200,7 @@ class Percentile(Statistic):
def _histogram_compute(self, metric: Metric):
return f"""
jackknife_percentile_ci(
`moz-fx-data-shared-prod.udf_js.bootstrap_percentile_ci`(
{self.percentiles},
merge_histogram_values(
ARRAY_CONCAT_AGG(

Просмотреть файл

@ -62,7 +62,7 @@ setup(
"pytz",
"requests",
"toml",
"mozilla-jetstream-config-parser",
"mozilla-metric-config-parser",
],
include_package_data=True,
tests_require=test_dependencies,