summaryrefslogtreecommitdiffstats
path: root/ml/ml-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'ml/ml-private.h')
-rw-r--r--ml/ml-private.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/ml/ml-private.h b/ml/ml-private.h
index 2ed70d1ca..f0e2e7eaf 100644
--- a/ml/ml-private.h
+++ b/ml/ml-private.h
@@ -195,7 +195,7 @@ typedef struct {
std::vector<calculated_number_t> cns;
std::vector<ml_kmeans_t> km_contexts;
- netdata_mutex_t mutex;
+ SPINLOCK slock;
ml_kmeans_t kmeans;
std::vector<DSample> feature;
@@ -206,8 +206,6 @@ typedef struct {
typedef struct {
RRDSET *rs;
ml_machine_learning_stats_t mls;
-
- netdata_mutex_t mutex;
} ml_chart_t;
void ml_chart_update_dimension(ml_chart_t *chart, ml_dimension_t *dim, bool is_anomalous);
@@ -215,6 +213,8 @@ void ml_chart_update_dimension(ml_chart_t *chart, ml_dimension_t *dim, bool is_a
typedef struct {
RRDHOST *rh;
+ std::atomic<bool> ml_running;
+
ml_machine_learning_stats_t mls;
calculated_number_t host_anomaly_rate;
@@ -227,6 +227,9 @@ typedef struct {
* bookkeeping for anomaly detection charts
*/
+ RRDSET *ml_running_rs;
+ RRDDIM *ml_running_rd;
+
RRDSET *machine_learning_status_rs;
RRDDIM *machine_learning_status_enabled_rd;
RRDDIM *machine_learning_status_disabled_sp_rd;