ml-dummy.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #include "ml.h"
  3. #if !defined(ENABLE_ML)
  4. bool ml_capable() {
  5. return false;
  6. }
  7. bool ml_enabled(RRDHOST *rh) {
  8. UNUSED(rh);
  9. return false;
  10. }
  11. bool ml_streaming_enabled() {
  12. return false;
  13. }
  14. void ml_init(void) {}
  15. void ml_fini(void) {}
  16. void ml_start_threads(void) {}
  17. void ml_stop_threads(void) {}
  18. void ml_host_new(RRDHOST *rh) {
  19. UNUSED(rh);
  20. }
  21. void ml_host_delete(RRDHOST *rh) {
  22. UNUSED(rh);
  23. }
  24. void ml_host_start(RRDHOST *rh) {
  25. UNUSED(rh);
  26. }
  27. void ml_host_stop(RRDHOST *rh) {
  28. UNUSED(rh);
  29. }
  30. void ml_host_start_training_thread(RRDHOST *rh) {
  31. UNUSED(rh);
  32. }
  33. void ml_host_stop_training_thread(RRDHOST *rh) {
  34. UNUSED(rh);
  35. }
  36. void ml_host_cancel_training_thread(RRDHOST *rh) {
  37. UNUSED(rh);
  38. }
  39. void ml_host_get_info(RRDHOST *rh, BUFFER *wb) {
  40. UNUSED(rh);
  41. UNUSED(wb);
  42. }
  43. void ml_host_get_models(RRDHOST *rh, BUFFER *wb) {
  44. UNUSED(rh);
  45. UNUSED(wb);
  46. }
  47. void ml_host_get_runtime_info(RRDHOST *rh) {
  48. UNUSED(rh);
  49. }
  50. void ml_chart_new(RRDSET *rs) {
  51. UNUSED(rs);
  52. }
  53. void ml_chart_delete(RRDSET *rs) {
  54. UNUSED(rs);
  55. }
  56. bool ml_chart_update_begin(RRDSET *rs) {
  57. UNUSED(rs);
  58. return false;
  59. }
  60. void ml_chart_update_end(RRDSET *rs) {
  61. UNUSED(rs);
  62. }
  63. void ml_dimension_new(RRDDIM *rd) {
  64. UNUSED(rd);
  65. }
  66. void ml_dimension_delete(RRDDIM *rd) {
  67. UNUSED(rd);
  68. }
  69. bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists) {
  70. UNUSED(rd);
  71. UNUSED(curr_time);
  72. UNUSED(value);
  73. UNUSED(exists);
  74. return false;
  75. }
  76. int ml_dimension_load_models(RRDDIM *rd, sqlite3_stmt **stmp) {
  77. UNUSED(rd);
  78. return 0;
  79. }
  80. void ml_update_global_statistics_charts(uint64_t models_consulted) {
  81. UNUSED(models_consulted);
  82. }
  83. bool ml_host_get_host_status(RRDHOST *rh, struct ml_metrics_statistics *mlm) {
  84. memset(mlm, 0, sizeof(*mlm));
  85. return false;
  86. }
  87. bool ml_host_running(RRDHOST *rh) {
  88. return false;
  89. }
  90. #endif