benchmark

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NETWORK            string = "preprod"
	BFC_NETWORK_ID     int    = 0
	MAESTRO_NETWORK_ID int    = 3 // preprod
	BFC_API_URL        string = "https://cardano-preprod.blockfrost.io/api"
	BFC_API_KEY        string = "preprod9zzl4g8Xa3faU50a1OVDZdPeQ92ZsdcT"
	MAESTRO_API_KEY    string = "Dq21Cy4YQeH7AL8q61wAqYcHHur7QT9S"
	OGMIGO_ENDPOINT    string = "ws://localhost:1337"
	KUGO_ENDPOINT      string = "http://localhost:1442"

	TEST_WALLET_ADDRESS string = "addr_test1qrp4wsrz6vsjjkhja7j60tyfvnhzf7v97asw29r56kd7pw5rrml46886jg3mwuaq9svtznns6p53gxx7ut9y6pv9e9rsukn05x"
)

Variables

This section is empty.

Functions

func BlockfrostCTXSetup

func BlockfrostCTXSetup() (bfc BlockFrostChainContext.BlockFrostChainContext, err error)

func GetChainContext

func GetChainContext(backend string) (Base.ChainContext, error)

func MaestroCTXSetup

func MaestroCTXSetup() (mc MaestroChainContext.MaestroChainContext, err error)

func PrintResults

func PrintResults(wallClockTPS, latencyTPS float64, avgLatency time.Duration,
	failures, iterations, parallelism, utxoCount int, benchDuration time.Duration,
	format string)

func Run

func Run(utxoCount, iterations, parallelism int, backend string, outputFormat string, cpuProfile string)

Types

type BenchmarkResult

type BenchmarkResult struct {
	WallClockTPS  float64       `json:"wall_clock_tps"`
	LatencyTPS    float64       `json:"latency_tps"`
	AvgLatency    time.Duration `json:"avg_latency"`
	Failures      int           `json:"failures"`
	Iterations    int           `json:"iterations"`
	Parallelism   int           `json:"parallelism"`
	UTXOCount     int           `json:"utxo_count"`
	SystemInfo    SystemInfo    `json:"system_info"`
	BenchDuration time.Duration `json:"bench_duration"`
}

type ChainContext

type ChainContext interface{}

type Result

type Result struct {
	Duration time.Duration
	Error    error
}

type SystemInfo

type SystemInfo struct {
	GoVersion    string
	OS           string
	CPUModel     string
	TotalMemory  uint64
	AvailableMem uint64
}

func GetSystemInfo

func GetSystemInfo() SystemInfo

Jump to

Keyboard shortcuts

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