@@ -8,18 +8,6 @@ import (
8
8
9
9
type (
10
10
engineMetrics struct {
11
- listContainersDurationCounter prometheus.Counter
12
- estimateContainerSizeDurationCounter prometheus.Counter
13
- deleteDurationCounter prometheus.Counter
14
- existsDurationCounter prometheus.Counter
15
- getDurationCounter prometheus.Counter
16
- headDurationCounter prometheus.Counter
17
- inhumeDurationCounter prometheus.Counter
18
- putDurationCounter prometheus.Counter
19
- rangeDurationCounter prometheus.Counter
20
- searchDurationCounter prometheus.Counter
21
- listObjectsDurationCounter prometheus.Counter
22
-
23
11
listContainersDuration prometheus.Histogram
24
12
estimateContainerSizeDuration prometheus.Histogram
25
13
deleteDuration prometheus.Histogram
@@ -166,72 +154,49 @@ func (m engineMetrics) register() {
166
154
prometheus .MustRegister (m .listObjectsDuration )
167
155
prometheus .MustRegister (m .containerSize )
168
156
prometheus .MustRegister (m .payloadSize )
169
-
170
- prometheus .MustRegister (m .listContainersDurationCounter )
171
- prometheus .MustRegister (m .estimateContainerSizeDurationCounter )
172
- prometheus .MustRegister (m .deleteDurationCounter )
173
- prometheus .MustRegister (m .existsDurationCounter )
174
- prometheus .MustRegister (m .getDurationCounter )
175
- prometheus .MustRegister (m .headDurationCounter )
176
- prometheus .MustRegister (m .inhumeDurationCounter )
177
- prometheus .MustRegister (m .putDurationCounter )
178
- prometheus .MustRegister (m .rangeDurationCounter )
179
- prometheus .MustRegister (m .searchDurationCounter )
180
- prometheus .MustRegister (m .listObjectsDurationCounter )
181
157
}
182
158
183
159
func (m engineMetrics ) AddListContainersDuration (d time.Duration ) {
184
- m .listObjectsDurationCounter .Add (float64 (d ))
185
160
m .listObjectsDuration .Observe (d .Seconds ())
186
161
}
187
162
188
163
func (m engineMetrics ) AddEstimateContainerSizeDuration (d time.Duration ) {
189
- m .estimateContainerSizeDurationCounter .Add (float64 (d ))
190
164
m .estimateContainerSizeDuration .Observe (d .Seconds ())
191
165
}
192
166
193
167
func (m engineMetrics ) AddDeleteDuration (d time.Duration ) {
194
- m .deleteDurationCounter .Add (float64 (d ))
195
168
m .deleteDuration .Observe (d .Seconds ())
196
169
}
197
170
198
171
func (m engineMetrics ) AddExistsDuration (d time.Duration ) {
199
- m .existsDurationCounter .Add (float64 (d ))
200
172
m .existsDuration .Observe (d .Seconds ())
201
173
}
202
174
203
175
func (m engineMetrics ) AddGetDuration (d time.Duration ) {
204
- m .getDurationCounter .Add (float64 (d ))
205
176
m .getDuration .Observe (d .Seconds ())
206
177
}
207
178
208
179
func (m engineMetrics ) AddHeadDuration (d time.Duration ) {
209
- m .headDurationCounter .Add (float64 (d ))
210
180
m .headDuration .Observe (d .Seconds ())
211
181
}
212
182
213
183
func (m engineMetrics ) AddInhumeDuration (d time.Duration ) {
214
- m .inhumeDurationCounter .Add (float64 (d ))
215
184
m .inhumeDuration .Observe (d .Seconds ())
216
185
}
217
186
218
187
func (m engineMetrics ) AddPutDuration (d time.Duration ) {
219
- m .putDurationCounter .Add (float64 (d ))
220
188
m .putDuration .Observe (d .Seconds ())
221
189
}
222
190
223
191
func (m engineMetrics ) AddRangeDuration (d time.Duration ) {
224
- m .rangeDurationCounter .Add (float64 (d ))
225
192
m .rangeDuration .Observe (d .Seconds ())
226
193
}
227
194
228
195
func (m engineMetrics ) AddSearchDuration (d time.Duration ) {
229
- m .searchDurationCounter .Add (float64 (d ))
230
196
m .searchDuration .Observe (d .Seconds ())
231
197
}
232
198
233
199
func (m engineMetrics ) AddListObjectsDuration (d time.Duration ) {
234
- m .listObjectsDurationCounter .Add (float64 (d ))
235
200
m .listObjectsDuration .Observe (d .Seconds ())
236
201
}
237
202
0 commit comments