master
c 138 lines 2.71 KB
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #include "ml_public.h"
4
5 #if !defined(ENABLE_ML)
6
7 bool ml_capable() {
8 return false;
9 }
10
11 bool ml_enabled(RRDHOST *rh) {
12 UNUSED(rh);
13 return false;
14 }
15
16 bool ml_streaming_enabled() {
17 return false;
18 }
19
20 void ml_init(void) {}
21
22 void ml_fini(void) {}
23
24 void ml_start_threads(void) {}
25
26 void ml_stop_threads(void) {}
27
28 void ml_host_new(RRDHOST *rh) {
29 UNUSED(rh);
30 }
31
32 void ml_host_delete(RRDHOST *rh) {
33 UNUSED(rh);
34 }
35
36 void ml_host_start(RRDHOST *rh) {
37 UNUSED(rh);
38 }
39
40 void ml_host_stop(RRDHOST *rh) {
41 UNUSED(rh);
42 }
43
44 void ml_host_get_info(RRDHOST *rh, BUFFER *wb) {
45 UNUSED(rh);
46 UNUSED(wb);
47 }
48
49 void ml_host_get_models(RRDHOST *rh, BUFFER *wb) {
50 UNUSED(rh);
51 UNUSED(wb);
52 }
53
54 void ml_host_get_runtime_info(RRDHOST *rh) {
55 UNUSED(rh);
56 }
57
58 void ml_chart_new(RRDSET *rs) {
59 UNUSED(rs);
60 }
61
62 void ml_chart_delete(RRDSET *rs) {
63 UNUSED(rs);
64 }
65
66 bool ml_chart_update_begin(RRDSET *rs) {
67 UNUSED(rs);
68 return false;
69 }
70
71 void ml_chart_update_end(RRDSET *rs) {
72 UNUSED(rs);
73 }
74
75 void ml_dimension_new(RRDDIM *rd) {
76 UNUSED(rd);
77 }
78
79 void ml_dimension_delete(RRDDIM *rd) {
80 UNUSED(rd);
81 }
82
83 bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists) {
84 UNUSED(rd);
85 UNUSED(curr_time);
86 UNUSED(value);
87 UNUSED(exists);
88 return false;
89 }
90
91 int ml_dimension_load_models(RRDDIM *rd, sqlite3_stmt **stmp __maybe_unused) {
92 UNUSED(rd);
93 return 0;
94 }
95
96 void ml_dimension_received_anomaly(RRDDIM *rd, bool is_anomalous) {
97 UNUSED(rd);
98 UNUSED(is_anomalous);
99 }
100
101 void ml_update_global_statistics_charts(uint64_t models_consulted,
102 uint64_t models_received,
103 uint64_t models_sent,
104 uint64_t models_ignored,
105 uint64_t models_deserialization_failures,
106 uint64_t memory_consumption,
107 uint64_t memory_new,
108 uint64_t memory_delete) {
109 UNUSED(models_consulted);
110 UNUSED(models_received);
111 UNUSED(models_sent);
112 UNUSED(models_ignored);
113 UNUSED(models_deserialization_failures);
114 UNUSED(memory_consumption);
115 UNUSED(memory_new);
116 UNUSED(memory_delete);
117 }
118
119 bool ml_host_get_host_status(RRDHOST *rh __maybe_unused, struct ml_metrics_statistics *mlm) {
120 memset(mlm, 0, sizeof(*mlm));
121 return false;
122 }
123
124 bool ml_host_running(RRDHOST *rh __maybe_unused) {
125 return false;
126 }
127
128 bool ml_model_received_from_child(RRDHOST *host, const char *json) {
129 UNUSED(host);
130 UNUSED(json);
131 return false;
132 }
133
134 void ml_host_disconnected(RRDHOST *rh) {
135 UNUSED(rh);
136 }
137
138 #endif