This repository was archived by the owner on Mar 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 310
FAQ
Bohan Zhang edited this page Jan 7, 2019
·
8 revisions
```
File "/home/ubuntu/ottertune/server/website/website/parser/base.py", line 302, in calculate_change_in_metrics
assert adj_val >= 0, '{} wrong metric type '.format(met_name)
AssertionError: pg_stat_user_tables.n_mod_since_analyze wrong metric type
```
This is because the value in metric_after.json is smaller than that in metric_before.json, the change is smaller than 0. If the metric type is MetricType.COUNTER, we calculate the change and require it is positive. Otherwise we set the metric as the value in metric_after.json. Thus, you can fix it by changing the metric type as 2 (MetricType.INFO) or 3 (MetricType.STATISTICS) in the metric fixture.
A brief answer is to add a collector in the client side, and a parser in the server side. OtterTune also needs knob and metric fixture of the target database. You do not need to collect all the information of knobs/metrics, start with some important ones. This PR is an example to support SAP HANA. (https://github.com/cmu-db/ottertune/pull/194)
You can define your own function as a target objective, you should collect its information in the client side. This PR has some description. (https://github.com/cmu-db/ottertune/pull/182)