Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AwsMetricsEnabledFlag = cli.BoolFlag{ Name: "awsmetrics", Usage: `AWS metrics enabled`, } AwsRegionFlag = cli.StringFlag{ Name: "awsregion", Usage: `AWS region`, } AwsNwNameFlag = cli.StringFlag{ Name: "awsnetwork", Usage: `AWS network name`, } AwsInstanceFlag = cli.StringFlag{ Name: "awsinst", Usage: `AWS instance name`, } InfluxdbEnabledFlag = cli.BoolFlag{ Name: "influxdb", Usage: `Influxdb enabled`, } InfluxdbEndpointFlag = cli.StringFlag{ Name: "influxdb.endpoint", Usage: `Influxdb endpoint`, Value: "http://localhost:8086", } InfluxdbTokenFlag = cli.StringFlag{ Name: "influxdb.token", Usage: `Influxdb token or username:password`, Value: ":", } InfluxdbOrgFlag = cli.StringFlag{ Name: "influxdb.org", Usage: `Influxdb org name`, Value: "", } InfluxdbBucketFlag = cli.StringFlag{ Name: "influxdb.bucket", Usage: `Influxdb bucket or database name`, Value: "telegraf", } InfluxdbPointNameFlag = cli.StringFlag{ Name: "influxdb.measurement", Usage: `Influxdb measurement name`, Value: "quorum_tps", } InfluxdbTagsFlag = cli.StringFlag{ Name: "influxdb.tags", Usage: `Influxdb tags (comma separated list of key=value pairs)`, Value: "system=quorum,comp=tps", } ConsensusFlag = cli.StringFlag{ Name: "consensus", Usage: `Name of consensus ("raft", "ibft")`, } DebugFlag = cli.BoolFlag{ Name: "debug", Usage: `Debug mode`, } HttpEndpointFlag = cli.StringFlag{ Name: "httpendpoint", Usage: "Geth's http endpoint", } ReportFileFlag = cli.StringFlag{ Name: "report", Usage: "Full path of csv report file", Value: "tps-report.csv", } TpsPortFlag = cli.IntFlag{ Name: "port", Usage: "Http port for tps monitor", Value: 7575, } FromBlockFlag = cli.Uint64Flag{ Name: "from", Usage: "From block no", Value: 0, } ToBlockFlag = cli.Uint64Flag{ Name: "to", Usage: "To block no", Value: 0, } PrometheusPortFlag = cli.IntFlag{ Name: "prometheusport", Usage: "Enable prometheus metrics", Value: 0, } )
Functions ¶
This section is empty.
Types ¶
type AwsCloudwatchService ¶
type AwsCloudwatchService struct {
// contains filtered or unexported fields
}
wrapper for aws cloudwatch to publish metrics
func NewCloudwatchService ¶
func NewCloudwatchService(region string, nwname string, inst string) *AwsCloudwatchService
func (*AwsCloudwatchService) PutMetrics ¶
type InfluxdbMetricsService ¶
type InfluxdbMetricsService struct {
// contains filtered or unexported fields
}
func NewInfluxdbService ¶
func (*InfluxdbMetricsService) PushMetrics ¶
type PrometheusMetricsService ¶
type PrometheusMetricsService struct {
// contains filtered or unexported fields
}
func NewPrometheusMetricsService ¶
func NewPrometheusMetricsService(port int) *PrometheusMetricsService
func (*PrometheusMetricsService) Start ¶
func (ps *PrometheusMetricsService) Start()
type TPSMonitor ¶
type TPSMonitor struct {
// contains filtered or unexported fields
}
TPSMonitor implements a monitor service
func NewTPSMonitor ¶
func NewTPSMonitor(awsService *AwsCloudwatchService, promethService *PrometheusMetricsService, influxdbService *InfluxdbMetricsService, isRaft bool, report string, frmBlk uint64, toBlk uint64, httpendpoint string) *TPSMonitor
func (*TPSMonitor) IfBlockRangeGiven ¶
func (tm *TPSMonitor) IfBlockRangeGiven() bool
func (*TPSMonitor) StartTpsForBlockRange ¶
func (tm *TPSMonitor) StartTpsForBlockRange()
func (*TPSMonitor) StartTpsForNewBlocksFromChain ¶
func (tm *TPSMonitor) StartTpsForNewBlocksFromChain()
starts service to calculate tps
type TPSRecord ¶
type TPSRecord struct {
// contains filtered or unexported fields
}
TPSRecord represents a data point of TPS at a specific time
func (TPSRecord) ReportString ¶
type TPSServer ¶
type TPSServer struct {
// contains filtered or unexported fields
}
func NewTPSServer ¶
func NewTPSServer(tm *TPSMonitor, port int) TPSServer
func (TPSServer) PrintTPSData ¶
func (s TPSServer) PrintTPSData(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.