summaryrefslogtreecommitdiffstats
path: root/ml/Stats.h
blob: b99bc39da54317083b72eac137f89833ea1c7cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef ML_STATS_H
#define ML_STATS_H

#include "ml-private.h"

namespace ml {

struct MachineLearningStats {
    size_t NumMachineLearningStatusEnabled;
    size_t NumMachineLearningStatusDisabledUE;
    size_t NumMachineLearningStatusDisabledSP;

    size_t NumMetricTypeConstant;
    size_t NumMetricTypeVariable;

    size_t NumTrainingStatusUntrained;
    size_t NumTrainingStatusPendingWithoutModel;
    size_t NumTrainingStatusTrained;
    size_t NumTrainingStatusPendingWithModel;

    size_t NumAnomalousDimensions;
    size_t NumNormalDimensions;
};

struct TrainingStats {
    struct rusage TrainingRU;

    size_t QueueSize;
    size_t NumPoppedItems;

    usec_t AllottedUT;
    usec_t ConsumedUT;
    usec_t RemainingUT;

    size_t TrainingResultOk;
    size_t TrainingResultInvalidQueryTimeRange;
    size_t TrainingResultNotEnoughCollectedValues;
    size_t TrainingResultNullAcquiredDimension;
    size_t TrainingResultChartUnderReplication;
};

} // namespace ml

#endif /* ML_STATS_H */