forked from TrueCloudLab/frostfs-node
WIP: Morph: Add unit tests #2
5 changed files with 11 additions and 11 deletions
|
@ -43,14 +43,14 @@ func newEngineMetrics() *engineMetrics {
|
|||
return &engineMetrics{
|
||||
containerSize: newEngineGaugeVector("container_size_bytes", "Accumulated size of all objects in a container", []string{containerIDLabelKey}),
|
||||
payloadSize: newEngineGaugeVector("payload_size_bytes", "Accumulated size of all objects in a shard", []string{shardIDLabelKey}),
|
||||
errorCounter: newEngineGaugeVector("error_counter", "Shard's error counter", []string{shardIDLabelKey}),
|
||||
errorCounter: newEngineGaugeVector("errors_total", "Shard's error counter", []string{shardIDLabelKey}),
|
||||
methodDuration: metrics.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: engineSubsystem,
|
||||
Name: "request_duration_seconds",
|
||||
Help: "Duration of Engine requests",
|
||||
}, []string{engineMethod}),
|
||||
objectCounter: newEngineGaugeVector("object_counter", "Objects counters per shards", []string{shardIDLabelKey, counterTypeLabelKey}),
|
||||
objectCounter: newEngineGaugeVector("objects_total", "Objects counters per shards", []string{shardIDLabelKey, counterTypeLabelKey}),
|
||||
shardsReadonly: newEngineGaugeVector("mode", "Shard mode", []string{shardIDLabelKey}),
|
||||
gc: newGCMetrics(),
|
||||
writeCache: newWriteCacheMetrics(),
|
||||
|
|
|
@ -43,7 +43,7 @@ func newGCMetrics() *gcMetrics {
|
|||
deletedCounter: metrics.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: gcSubsystem,
|
||||
Name: "deleted_objects_count",
|
||||
Name: "deleted_objects_total",
|
||||
Help: "Total count of objects GC deleted or failed to delete from disk",
|
||||
}, []string{gcShardID, gcStatus}),
|
||||
expCollectDuration: metrics.NewCounterVec(prometheus.CounterOpts{
|
||||
|
@ -55,7 +55,7 @@ func newGCMetrics() *gcMetrics {
|
|||
inhumedCounter: metrics.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: gcSubsystem,
|
||||
Name: "marked_for_removal_objects_count",
|
||||
Name: "marked_for_removal_objects_total",
|
||||
Help: "Total count of expired objects GC marked to remove",
|
||||
}, []string{gcShardID, gcObjectType}),
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ func NewMorphClientMetrics() morphmetrics.Register {
|
|||
switchCount: metrics.NewCounter(prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: morphSubsystem,
|
||||
Name: "switch_count",
|
||||
Name: "switches_total",
|
||||
Help: "Number of endpoint switches",
|
||||
}),
|
||||
lastBlock: metrics.NewGauge(prometheus.GaugeOpts{
|
||||
|
@ -42,7 +42,7 @@ func NewMorphClientMetrics() morphmetrics.Register {
|
|||
notificationCount: metrics.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: morphSubsystem,
|
||||
Name: "notification_count",
|
||||
Name: "notifications_total",
|
||||
Help: "Number of notifications received by notification type",
|
||||
}, []string{morphNotificationTypeLabel}),
|
||||
invokeDuration: metrics.NewHistogramVec(prometheus.HistogramOpts{
|
||||
|
|
|
@ -40,9 +40,9 @@ func (m *replicatorMetrics) AddPayloadSize(size int64) {
|
|||
|
||||
func newReplicatorMetrics() *replicatorMetrics {
|
||||
return &replicatorMetrics{
|
||||
inFlightRequests: newReplicatorGauge("in_flight_requests", "Number of in-flight requests"),
|
||||
processedObjects: newReplicatorCounter("processed_objects", "Number of objects processed since the node startup"),
|
||||
totalReplicatedPayloadSize: newReplicatorCounter("total_replicated_payload_size", "Total size of payloads replicated"),
|
||||
inFlightRequests: newReplicatorGauge("in_flight_requests_total", "Number of in-flight requests"),
|
||||
processedObjects: newReplicatorCounter("processed_objects_total", "Number of objects processed since the node startup"),
|
||||
totalReplicatedPayloadSize: newReplicatorCounter("total_replicated_payload_size_bytes", "Total size of payloads replicated"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,10 +62,10 @@ func newWriteCacheMetrics() *writeCacheMetrics {
|
|||
operationCounter: metrics.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: wcSubsystem,
|
||||
Name: "operation_count",
|
||||
Name: "operations_total",
|
||||
Help: "The number of writecache operations processed",
|
||||
}, []string{wcShardID, wcStorage, wcSuccess, wcOperation}),
|
||||
actualCount: newWCGaugeVec("actual_objects_count", "Actual objects count in writecache", []string{wcShardID, wcStorage}),
|
||||
actualCount: newWCGaugeVec("actual_objects_total", "Actual objects count in writecache", []string{wcShardID, wcStorage}),
|
||||
estimatedSize: newWCGaugeVec("estimated_size_bytes", "Estimated writecache size", []string{wcShardID, wcStorage}),
|
||||
modeMtx: sync.RWMutex{},
|
||||
modeMetrics: make(map[shardIDMode]prometheus.GaugeFunc),
|
||||
|
|
Loading…
Reference in a new issue