explorer

package module
v0.0.0-...-97de7cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 12 Imported by: 0

README

Explorer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthBlockThroughput

func EthBlockThroughput(blockNumber int) float32

TODO do case blocknumber=0

func EthThroughput

func EthThroughput(blockStart, blockEnd int) float32

older function

func PrintRes

func PrintRes() float32

Types

type Block

type Block struct {
	BlockNumber int
	BlockHash   string
	Producer    string
	TxNumber    uint
	Timestamp   int64
	Date        string
}

type Blockchain

type Blockchain []Block

func BtcExplorer

func BtcExplorer(rpc, user, pass string, blockStart, blockEnd int) Blockchain

func EosExplorer

func EosExplorer(rpc, user, pass string, blockStart, blockEnd int) Blockchain

func EthExplorer

func EthExplorer(rpc, user, pass string, blockStart, blockEnd int) Blockchain

func QtumExplorer

func QtumExplorer(rpc, user, pass string, blockStart, blockEnd int) Blockchain

func (Blockchain) Analyse

func (bchain Blockchain) Analyse() Metrics

func (Blockchain) Print

func (bchain Blockchain) Print()

type Latency

type Latency struct {
	Type      string
	Blocktime []float32
	Average   float32
}

func (*Latency) TransLatency

func (l *Latency) TransLatency()

type Metric

type Metric struct {
	Total   float32
	Minimum float32
	Average float32
	Maximum float32
}

type Metrics

type Metrics struct {
	Throughput float32 `json:"Throughput (tx/sec)"`
	Latence    float32 `json:"Latence (sec)"`
	Size       Metric  `json:"Size (#tx)"`
}

TODO make Latence and throughput Metric

func (Metrics) Print

func (metrics Metrics) Print()

type Result

type Result struct {
	Chain      string
	Type       string
	BlockStart int
	BlockEnd   int
	Result     []float32
	Average    float32
}

func (*Result) ShowResult

func (s *Result) ShowResult()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL