github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/internal/state/metrics.go (about)

     1  package state
     2  
     3  import (
     4  	"github.com/go-kit/kit/metrics"
     5  )
     6  
     7  const (
     8  	// MetricsSubsystem is a subsystem shared by all metrics exposed by this
     9  	// package.
    10  	MetricsSubsystem = "state"
    11  )
    12  
    13  //go:generate go run ../../scripts/metricsgen -struct=Metrics
    14  
    15  // Metrics contains metrics exposed by this package.
    16  type Metrics struct {
    17  	// Time between BeginBlock and EndBlock.
    18  	BlockProcessingTime metrics.Histogram `metrics_buckettype:"exprange" metrics_bucketsizes:"0.01, 10, 10"`
    19  
    20  	// ConsensusParamUpdates is the total number of times the application has
    21  	// udated the consensus params since process start.
    22  	//metrics:Number of consensus parameter updates returned by the application since process start.
    23  	ConsensusParamUpdates metrics.Counter
    24  
    25  	// ValidatorSetUpdates is the total number of times the application has
    26  	// udated the validator set since process start.
    27  	//metrics:Number of validator set updates returned by the application since process start.
    28  	ValidatorSetUpdates metrics.Counter
    29  
    30  	// ValidatorSetUpdates measures how long it takes async ABCI requests to be flushed before
    31  	// committing application state
    32  	FlushAppConnectionTime metrics.Histogram
    33  
    34  	// ApplicationCommitTime meaures how long it takes to commit application state
    35  	ApplicationCommitTime metrics.Histogram
    36  
    37  	// UpdateMempoolTime meaures how long it takes to update mempool after commiting, including
    38  	// reCheckTx
    39  	UpdateMempoolTime metrics.Histogram
    40  }