diff options
author | vkalintiris <vasilis@netdata.cloud> | 2023-02-28 15:53:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 15:53:45 +0200 |
commit | 45981cb7347a5fed7ebbabba0fe193d0d9471eff (patch) | |
tree | dd5690ab7350d3885813bb3709b254e68c2ac7f4 /ml/ADCharts.h | |
parent | c8b4f19013182b03b6ba727dd784181e1beb8bf9 (diff) |
Port ML from C++ to C. (#14567)
* Port ML from C++ to C.
Pretty much everything is a non-functional change, ie.
the functionality is identical to the one provided
by the existing implementation that is written in C++.
Performance-wise, this implementation:
- Eliminates/reduces the number of allocations and
deallocations we have to do for training/detection,
- Uses just a single thread to perform detection for
*all* the hosts (ie. reduces the number of required
threads by 50% on parents), and
- Allows training, prediction and detection of
dimensions that have an update_every that is
different from that of the localhost.
The only C++ functionality that we still use
is vectors, because they make our life easier
and they are pretty much a requirement imposed
by dlib.
* Remove profile.plugin
It was useful only for testing during development.
* Limit logs to 200 lines per period
* Properly generate ml_info in /api/v1/info endpoint.
* Remove resource usage charts since we use worker charts.
* Use a temporary to make linters happy.
* Rebase.
* Fix builds that have ML functionality disabled.
Diffstat (limited to 'ml/ADCharts.h')
-rw-r--r-- | ml/ADCharts.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/ml/ADCharts.h b/ml/ADCharts.h deleted file mode 100644 index ee09669e22..0000000000 --- a/ml/ADCharts.h +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef ML_ADCHARTS_H -#define ML_ADCHARTS_H - -#include "Stats.h" -#include "ml-private.h" - -namespace ml { - -void updateDimensionsChart(RRDHOST *RH, const MachineLearningStats &MLS); - -void updateHostAndDetectionRateCharts(RRDHOST *RH, collected_number AnomalyRate); - -void updateResourceUsageCharts(RRDHOST *RH, const struct rusage &PredictionRU, const struct rusage &TrainingRU); - -void updateTrainingStatisticsChart(RRDHOST *RH, const TrainingStats &TS); - -} // namespace ml - -#endif /* ML_ADCHARTS_H */ |