Versions in this module Expand all Collapse all v1 v1.1.66 Jun 17, 2021 v1.1.65 Jun 17, 2021 Changes in this version + var ErrInvalidRoundDuration = errors.New("invalid round duration") + var ErrInvalidShardId = errors.New("invalid shard id") + var ErrNilFileToWriteStats = errors.New("nil file to write statistics") + var ErrNilInitialTPSBenchmarks = errors.New("nil initial TPS benchmarks") + var ErrNilStatusHandler = errors.New("nil status handler") + type ResourceMonitor struct + func NewResourceMonitor() *ResourceMonitor + func (rm *ResourceMonitor) GenerateStatistics(generalConfig *config.Config, pathManager storage.PathManagerHandler, ...) []interface{} + func (rm *ResourceMonitor) SaveStatistics(generalConfig *config.Config, pathManager storage.PathManagerHandler, ...) + type ShardStatistic interface + AverageBlockTxCount func() uint32 + AverageTPS func() *big.Int + CurrentBlockNonce func() uint64 + IsInterfaceNil func() bool + LastBlockTxCount func() uint32 + LiveTPS func() float64 + PeakTPS func() float64 + ShardID func() uint32 + TotalProcessedTxCount func() *big.Int + type ShardStatistics struct + func (ss *ShardStatistics) AverageBlockTxCount() uint32 + func (ss *ShardStatistics) AverageTPS() *big.Int + func (ss *ShardStatistics) CurrentBlockNonce() uint64 + func (ss *ShardStatistics) IsInterfaceNil() bool + func (ss *ShardStatistics) LastBlockTxCount() uint32 + func (ss *ShardStatistics) LiveTPS() float64 + func (ss *ShardStatistics) PeakTPS() float64 + func (ss *ShardStatistics) ShardID() uint32 + func (ss *ShardStatistics) TotalProcessedTxCount() *big.Int + type TPSBenchmark interface + ActiveNodes func() uint32 + AverageBlockTxCount func() *big.Int + BlockNumber func() uint64 + IsInterfaceNil func() bool + LastBlockTxCount func() uint32 + LiveTPS func() float64 + NrOfShards func() uint32 + PeakTPS func() float64 + RoundNumber func() uint64 + RoundTime func() uint64 + ShardStatistic func(shardID uint32) ShardStatistic + ShardStatistics func() map[uint32]ShardStatistic + TotalProcessedTxCount func() *big.Int + Update func(mb data.HeaderHandler) + type TpsBenchmark struct + func NewTPSBenchmark(nrOfShards uint32, roundDuration uint64) (*TpsBenchmark, error) + func NewTPSBenchmarkWithInitialData(appStatusHandler core.AppStatusHandler, initialTpsBenchmark *TpsPersistentData, ...) (*TpsBenchmark, error) + func (s *TpsBenchmark) ActiveNodes() uint32 + func (s *TpsBenchmark) AverageBlockTxCount() *big.Int + func (s *TpsBenchmark) BlockNumber() uint64 + func (s *TpsBenchmark) IsInterfaceNil() bool + func (s *TpsBenchmark) LastBlockTxCount() uint32 + func (s *TpsBenchmark) LiveTPS() float64 + func (s *TpsBenchmark) NrOfShards() uint32 + func (s *TpsBenchmark) PeakTPS() float64 + func (s *TpsBenchmark) RoundNumber() uint64 + func (s *TpsBenchmark) RoundTime() uint64 + func (s *TpsBenchmark) ShardStatistic(shardID uint32) ShardStatistic + func (s *TpsBenchmark) ShardStatistics() map[uint32]ShardStatistic + func (s *TpsBenchmark) TotalProcessedTxCount() *big.Int + func (s *TpsBenchmark) Update(mblock data.HeaderHandler) + type TpsPersistentData struct + AverageBlockTxCount *big.Int + BlockNumber uint64 + LastBlockTxCount uint32 + PeakTPS float64 + RoundNumber uint64 + TotalProcessedTxCount *big.Int