ml-dummy.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_training_thread(RRDHOST *rh) {
  25. UNUSED(rh);
  26. }
  27. void ml_host_stop_training_thread(RRDHOST *rh) {
  28. UNUSED(rh);
  29. }
  30. void ml_host_cancel_training_thread(RRDHOST *rh) {
  31. UNUSED(rh);
  32. }
  33. void ml_host_get_info(RRDHOST *rh, BUFFER *wb) {
  34. UNUSED(rh);
  35. UNUSED(wb);
  36. }
  37. void ml_host_get_models(RRDHOST *rh, BUFFER *wb) {
  38. UNUSED(rh);
  39. UNUSED(wb);
  40. }
  41. void ml_host_get_runtime_info(RRDHOST *rh) {
  42. UNUSED(rh);
  43. }
  44. void ml_chart_new(RRDSET *rs) {
  45. UNUSED(rs);
  46. }
  47. void ml_chart_delete(RRDSET *rs) {
  48. UNUSED(rs);
  49. }
  50. bool ml_chart_update_begin(RRDSET *rs) {
  51. UNUSED(rs);
  52. return false;
  53. }
  54. void ml_chart_update_end(RRDSET *rs) {
  55. UNUSED(rs);
  56. }
  57. void ml_dimension_new(RRDDIM *rd) {
  58. UNUSED(rd);
  59. }
  60. void ml_dimension_delete(RRDDIM *rd) {
  61. UNUSED(rd);
  62. }
  63. bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists) {
  64. UNUSED(rd);
  65. UNUSED(curr_time);
  66. UNUSED(value);
  67. UNUSED(exists);
  68. return false;
  69. }
  70. int ml_dimension_load_models(RRDDIM *rd) {
  71. UNUSED(rd);
  72. return 0;
  73. }
  74. void ml_update_global_statistics_charts(uint64_t models_consulted) {
  75. UNUSED(models_consulted);
  76. }
  77. #endif