Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FluxJobMap ¶
type FluxJobMap map[contracts.FluxAggregator]map[client.Chainlink]string
FluxJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type FluxTest ¶
type FluxTest struct { TestOptions FluxTestOptions ContractOptions contracts.FluxAggregatorOptions Environment environment.Environment Blockchain client.BlockchainClient Wallets client.BlockchainWallets Deployer contracts.ContractDeployer Prometheus *client.Prometheus // contains filtered or unexported fields }
FluxTest is the implementation of Test that will configure and execute a performance test of FluxAggregator contracts & jobs
func (*FluxTest) RecordValues ¶
func (f *FluxTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues will query all of the latencies of the FluxAggregator rounds and then record them within the test runner
type FluxTestOptions ¶
type FluxTestOptions struct { TestOptions RequiredSubmissions int RestartDelayRounds int NodePollTimePeriod time.Duration MeasureLatenciesPerRound bool }
FluxTestOptions contains the parameters for the performance test to be executed
type FluxTestResult ¶
FluxTestResult contains the start & end time of the round submission to calculate latency
type FluxTestResults ¶
type FluxTestResults struct {
// contains filtered or unexported fields
}
FluxTestResults is a complex map that holds all test data in a map by the round ID, then contract instance and then the Chainlink client
func NewFluxTestResults ¶
func NewFluxTestResults() FluxTestResults
NewFluxTestResults returns an instance FluxTestResults with it fully initialised based on test param
func (FluxTestResults) Get ¶
func (f FluxTestResults) Get( roundID int64, contract contracts.FluxAggregator, chainlink client.Chainlink, ) *FluxTestResult
Get a value from the test results map with nil checking to avoid panics
func (FluxTestResults) GetAll ¶
func (f FluxTestResults) GetAll() map[int64]map[contracts.FluxAggregator]map[client.Chainlink]*FluxTestResult
GetAll returns the full map, not safe for concurrent actions
type PercentileReport ¶
type PercentileReport struct { StdDev float64 Max float64 Min float64 P99 float64 P95 float64 P90 float64 P50 float64 }
PercentileReport common percentile report
func NewPercentileReport ¶
func NewPercentileReport(data []time.Duration) (*PercentileReport, error)
NewPercentileReport calculates percentiles for arbitrary float64 data
func (*PercentileReport) PrintPercentileMetrics ¶
func (m *PercentileReport) PrintPercentileMetrics()
PrintPercentileMetrics prints percentile metrics
type Test ¶
type Test interface { Setup() error Run() error RecordValues(b ginkgo.Benchmarker) error }
Test is the interface to be implemented for performance tests
func NewFluxTest ¶
func NewFluxTest( testOptions FluxTestOptions, contractOptions contracts.FluxAggregatorOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, prom *client.Prometheus, ) Test
NewFluxTest returns an instantiated instance of FluxTest