summaryrefslogtreecommitdiffstats
path: root/ml/Query.h
diff options
context:
space:
mode:
Diffstat (limited to 'ml/Query.h')
-rw-r--r--ml/Query.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/ml/Query.h b/ml/Query.h
index 78d117003..42a96e85b 100644
--- a/ml/Query.h
+++ b/ml/Query.h
@@ -8,19 +8,19 @@ namespace ml {
class Query {
public:
Query(RRDDIM *RD) : RD(RD), Initialized(false) {
- Ops = RD->tiers[0]->query_ops;
+ Ops = RD->tiers[0].query_ops;
}
time_t latestTime() {
- return Ops->latest_time(RD->tiers[0]->db_metric_handle);
+ return Ops->latest_time_s(RD->tiers[0].db_metric_handle);
}
time_t oldestTime() {
- return Ops->oldest_time(RD->tiers[0]->db_metric_handle);
+ return Ops->oldest_time_s(RD->tiers[0].db_metric_handle);
}
void init(time_t AfterT, time_t BeforeT) {
- Ops->init(RD->tiers[0]->db_metric_handle, &Handle, AfterT, BeforeT);
+ Ops->init(RD->tiers[0].db_metric_handle, &Handle, AfterT, BeforeT, STORAGE_PRIORITY_BEST_EFFORT);
Initialized = true;
points_read = 0;
}
@@ -40,7 +40,7 @@ public:
std::pair<time_t, CalculatedNumber> nextMetric() {
points_read++;
STORAGE_POINT sp = Ops->next_metric(&Handle);
- return { sp.start_time, sp.sum / sp.count };
+ return {sp.end_time_s, sp.sum / sp.count };
}
private: