forked from TrueCloudLab/frostfs-node
[#374] Add inner-ring event metrics
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
8dcd06c587
commit
ebcc8afbee
27 changed files with 287 additions and 113 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/metrics"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation/state"
|
||||
cntClient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||
|
@ -72,6 +73,7 @@ type (
|
|||
// and new epoch ticker, because it is related to contract.
|
||||
Processor struct {
|
||||
log *logger.Logger
|
||||
metrics metrics.Register
|
||||
pool *ants.Pool
|
||||
epochTimer EpochTimerReseter
|
||||
epochState EpochState
|
||||
|
@ -93,6 +95,7 @@ type (
|
|||
// Params of the processor constructor.
|
||||
Params struct {
|
||||
Log *logger.Logger
|
||||
Metrics metrics.Register
|
||||
PoolSize int
|
||||
NetmapClient Client
|
||||
EpochTimer EpochTimerReseter
|
||||
|
@ -145,8 +148,14 @@ func New(p *Params) (*Processor, error) {
|
|||
return nil, fmt.Errorf("ir/netmap: can't create worker pool: %w", err)
|
||||
}
|
||||
|
||||
metricsRegister := p.Metrics
|
||||
if metricsRegister == nil {
|
||||
metricsRegister = metrics.DefaultRegister{}
|
||||
}
|
||||
|
||||
return &Processor{
|
||||
log: p.Log,
|
||||
metrics: metricsRegister,
|
||||
pool: pool,
|
||||
epochTimer: p.EpochTimer,
|
||||
epochState: p.EpochState,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue