Welcome to mirror list, hosted at ThFree Co, Russian Federation.

evaluate_percentage_deviations_in_remainder.yaml « zbxserver « libs « tests - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e92b98d4c4d0d688213fa46693f2100ff1eb7fa1 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
---
test case: mad, 2 dc, 1 entry is excluded from the detection period
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 14:00:00.000000001 +00:00
    - value: 2
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 12:00:00.000000000 +00:00
    - value: 4
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 5
      ts: 2021-03-27 10:00:00.000000000 +00:00
    - value: 1
      ts: 2021-03-27 09:00:00.000000000 +00:00
  time: 2021-03-27 15:00:00.000000000 +00:00
  deviations_count: 2.0
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,4h'
out:
  return: SUCCEED
  value: 0.75
---
test case: mad, 2 dc, no entries excluded from the detection period
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 2
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 4
      ts: 2021-03-27 12:00:00.000000000 +00:00
    - value: 5
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 1
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 2.1
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,5h'
out:
  return: SUCCEED
  value: 0.6
---
test case: mad, 0 dc
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 2
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 4
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 5
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 0
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,7h'
out:
  return: SUCCEED
  value: 1
---
test case: mad, 1 dc, stable series
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 1
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 1
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 1
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 666
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 1.0001
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,7h'
out:
  return: SUCCEED
  value: 1.0
---
test case: mad, 4 dc
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 3
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 5
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 666
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 3.9999
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,7h'
out:
  return: SUCCEED
  value: 0.5
---
test case: mad, time shift, 4 dc, small detection period
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 2
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 666
      ts: 2021-03-27 12:00:00.000000000 +00:00
    - value: 4
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 10000
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 4
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h-2h,3h'
out:
  return: SUCCEED
  value: 0.25
---
test case: mad, 4 dc, detection period removes all remainder
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_FLOAT
    data:
    - value: 1
      ts: 2021-03-27 15:00:00.000000001 +00:00
    - value: 2
      ts: 2021-03-27 14:00:00.000000000 +00:00
    - value: 3
      ts: 2021-03-27 13:00:00.000000000 +00:00
    - value: 666
      ts: 2026-03-27 12:00:00.000000000 +00:00
    - value: 4
      ts: 2021-03-27 11:00:00.000000000 +00:00
    - value: 10000
      ts: 2021-03-27 10:00:00.000000000 +00:00
  time: 2021-03-27 16:00:00.000000000 +00:00
  deviations_count: 4
  dev_alg: mad
  detect_period: 1d
  detect_period_type: 1
  params: '7h:now/h,1h'
out:
  return: SUCCEED
  value: 0
...