summaryrefslogtreecommitdiffstats
path: root/ml
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2023-01-12 10:42:30 +0200
committerGitHub <noreply@github.com>2023-01-12 10:42:30 +0200
commit265f5413c4aa026ee9097239ad474073c5a1d087 (patch)
treea35bbaebb8465b1100469a09cb77ba1edcdd5cbd /ml
parentb0924625dbb495a5ab5570940e4550285e92465e (diff)
Remove temporary allocations when preprocessing a samples buffer (#14208)
* Remove allocations when smoothing samples buffer The number of dims per sample is always 1, ie. we are training and predicting only individual dimensions. * Do not try to stop anomaly detection threads twice. A separate function call has been added to stop anomaly detection threads. This commit removes the left over function calls that were made internally when a host was being created/destroyed. * Move samples instead of copying.
Diffstat (limited to 'ml')
-rw-r--r--ml/SamplesBuffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ml/SamplesBuffer.cc b/ml/SamplesBuffer.cc
index 6278e27891..359b60c232 100644
--- a/ml/SamplesBuffer.cc
+++ b/ml/SamplesBuffer.cc
@@ -139,7 +139,7 @@ void SamplesBuffer::preprocess(std::vector<DSample> &Samples) {
const Sample PS = getPreprocessedSample(Idx);
PS.initDSample(DS);
- Samples.push_back(DS);
+ Samples.push_back(std::move(DS));
}
}