зеркало из https://github.com/mozilla/opmon.git
Use new percentile UDF
This commit is contained in:
Родитель
73148e3d6e
Коммит
7785257019
11
opmon/cli.py
11
opmon/cli.py
|
@ -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(
|
||||
|
|
2
setup.py
2
setup.py
|
@ -62,7 +62,7 @@ setup(
|
|||
"pytz",
|
||||
"requests",
|
||||
"toml",
|
||||
"mozilla-jetstream-config-parser",
|
||||
"mozilla-metric-config-parser",
|
||||
],
|
||||
include_package_data=True,
|
||||
tests_require=test_dependencies,
|
||||
|
|
Загрузка…
Ссылка в новой задаче