Skip to content

Commit a22dbee

Browse files
committed
addid
1 parent 050f7a5 commit a22dbee

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

aws/lambda/benchmark_regression_summary_report/common/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
),
4949
metrics={
5050
"passrate": RegressionPolicy(
51-
name="passrate", condition="greater_than", threshold=0.9, baseline_aggregation="max"
51+
name="passrate", condition="greater_equal", threshold=0.9, baseline_aggregation="max",
5252
),
5353
"geomean": RegressionPolicy(
54-
name="geomean", condition="greater_than", threshold=0.95,baseline_aggregation="max"
54+
name="geomean", condition="greater_equal", threshold=0.95,baseline_aggregation="max",
5555
),
5656
"compression_ratio": RegressionPolicy(
57-
name="compression_ratio", condition="greater_than", threshold=0.9, baseline_aggregation="max"
57+
name="compression_ratio", condition="greater_equal", threshold=0.9, baseline_aggregation="max",
5858
),
5959
},
6060
notification_config={

aws/lambda/benchmark_regression_summary_report/common/config_model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ def baseline_timedelta(self) -> timedelta:
9898
class RegressionPolicy:
9999
"""
100100
Defines the policy for a given metric.
101-
- "greater_than": higher is better; violation if new value < baseline * threshold
102-
- "less_than": lower is better; violation if new value > baseline * threshold
101+
- new value muset be {x} baseline value:
102+
- "greater_than": higher is better; new value must be strictly greater to baseline
103+
- "less_than": lower is better; new value must be strictly lower to baseline
103104
- "equal_to": new value should be ~= baseline * threshold within rel_tol
104-
- "greater_equal": higher is better; violation if new value <= baseline * threshold
105-
- "less_equal": lower is better; violation if new value >= baseline * threshold
106-
105+
- "greater_equal": higher is better; new value must be greater or equal to baseline
106+
- "less_equal": lower is better; new value must be less or equal to baseline
107107
"""
108108
name: str
109109
condition: Literal["greater_than", "less_than", "equal_to","greater_equal","less_equal"]

aws/lambda/benchmark_regression_summary_report/lambda_function.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def process(
8888
):
8989
# ensure each thread has its own clickhouse client. clickhouse client
9090
# is not thread-safe.
91-
logger.info("here")
9291
if cc is None:
9392
tlocal = threading.local()
9493
if not hasattr(tlocal, "cc") or tlocal.cc is None:
@@ -101,8 +100,6 @@ def process(
101100
else:
102101
tlocal.cc = get_clickhouse_client_environment()
103102
cc = tlocal.cc
104-
logger.info("i'm here")
105-
106103
try:
107104
config = get_benchmark_regression_config(config_id)
108105
logger.info("found config for config_id %s",config_id)
@@ -215,7 +212,7 @@ def _fetch_from_benchmark_ts_api(
215212
)
216213
url = source.api_query_url
217214

218-
logger.info("trying to call %s",url)
215+
logger.info("[%s]trying to call %s, with query %s",config_id, url,query)
219216
try:
220217
resp: BenchmarkTimeSeriesApiResponse = (
221218
BenchmarkTimeSeriesApiResponse.from_request(url, query)

0 commit comments

Comments
 (0)