diff options
author | vkalintiris <vasilis@netdata.cloud> | 2023-03-10 12:20:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 12:20:40 +0200 |
commit | 37a06960f90c046f21c125c2b4265713da04f851 (patch) | |
tree | 54ed00a16dffb010a10242507cadb7140b28975b /collectors/plugins.d | |
parent | a0652435f0dea126b6603a2467d912ca8a677e36 (diff) |
Refactor ML code. (#14659)
* Refactor ML code.
This commit introduces only non-functional changes.
Originally, the C++ code exposed C functions to be called
from the rest of the agent. When we migrated from C++ to C,
we did not eliminate these wrapper functions to make the
PR easier to understand and keep the total LOC low.
This commit removes the wrapper functions and "reclaims" the
`ml_` prefix that we used for the public API of the old
implementation.
Also, the nlohmann Json library has been removed and its
functionality was replaced with the equivalent Json functionality
that we added in libnetdata's BUFFERs.
* Remove missing headers from build systems.
* Fix CMake build.
* rrddim_free is outside of rrd "internals" now.
Diffstat (limited to 'collectors/plugins.d')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index 787f85d358..28fc0bd496 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -1693,10 +1693,10 @@ PARSER_RC pluginsd_set_v2(char **words, size_t num_words, void *user) { flags = SN_EMPTY_SLOT; if(u->v2.ml_locked) - ml_is_anomalous(rd, u->v2.end_time, 0, false); + ml_dimension_is_anomalous(rd, u->v2.end_time, 0, false); } else if(u->v2.ml_locked) { - if (ml_is_anomalous(rd, u->v2.end_time, value, true)) { + if (ml_dimension_is_anomalous(rd, u->v2.end_time, value, true)) { // clear anomaly bit: 0 -> is anomalous, 1 -> not anomalous flags &= ~((storage_number) SN_FLAG_NOT_ANOMALOUS); } |