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 /CMakeLists.txt | |
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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cfdcdbb284..19c4c7c047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -352,8 +352,7 @@ ENDIF() # Detect ml dependencies file(STRINGS "${CMAKE_SOURCE_DIR}/config.h" DEFINE_ENABLE_ML REGEX "^#define ENABLE_ML 1$") IF(DEFINE_ENABLE_ML MATCHES ".+" AND - EXISTS "${CMAKE_SOURCE_DIR}/ml/dlib/dlib/all/source.cpp" AND - EXISTS "${CMAKE_SOURCE_DIR}/ml/json/single_include/nlohmann/json.hpp") + EXISTS "${CMAKE_SOURCE_DIR}/ml/dlib/dlib/all/source.cpp") set(ENABLE_ML True) list(APPEND NETDATA_COMMON_CFLAGS "-DDLIB_NO_GUI_SUPPORT") list(APPEND NETDATA_COMMON_INCLUDE_DIRS "ml/dlib") @@ -718,12 +717,21 @@ set(STATSD_PLUGIN_FILES ) set(RRD_PLUGIN_FILES + database/contexts/api_v1.c + database/contexts/api_v2.c + database/contexts/context.c + database/contexts/instance.c + database/contexts/internal.h + database/contexts/metric.c + database/contexts/query_scope.c + database/contexts/query_target.c + database/contexts/rrdcontext.c + database/contexts/rrdcontext.h + database/contexts/worker.c database/rrdcalc.c database/rrdcalc.h database/rrdcalctemplate.c database/rrdcalctemplate.h - database/rrdcontext.c - database/rrdcontext.h database/rrddim.c database/rrddimvar.c database/rrddimvar.h @@ -747,7 +755,7 @@ set(RRD_PLUGIN_FILES database/sqlite/sqlite_metadata.h database/sqlite/sqlite_functions.c database/sqlite/sqlite_functions.h - database/sqlite/sqlite_context.c + database/sqlite/sqlite_context.c database/sqlite/sqlite_context.h database/sqlite/sqlite_db_migration.c database/sqlite/sqlite_db_migration.h @@ -1037,24 +1045,10 @@ set(ML_FILES IF(ENABLE_ML) message(STATUS "ML: enabled") list(APPEND ML_FILES - ml/ADCharts.h - ml/ADCharts.cc - ml/Chart.h - ml/Chart.cc - ml/Config.h + ml/ad_charts.h + ml/ad_charts.cc ml/Config.cc - ml/Dimension.h - ml/Dimension.cc - ml/Host.h - ml/Host.cc - ml/Mutex.h - ml/Query.h - ml/KMeans.h - ml/KMeans.cc - ml/SamplesBuffer.h - ml/SamplesBuffer.cc ml/dlib/dlib/all/source.cpp - ml/json/single_include/nlohmann/json.hpp ml/ml.cc ml/ml-private.h ) |