Documentation
¶
Index ¶
- type ConsumerCoordinatorPair
- type FluxJobMap
- type FluxTest
- type FluxTestOptions
- type FluxTestResult
- type FluxTestResults
- type KeeperJobMap
- type KeeperTest
- type KeeperTestOptions
- type OCRJobMap
- type OCRTest
- type OCRTestOptions
- type PercentileReport
- type Test
- func NewFluxTest(testOptions FluxTestOptions, contractOptions contracts.FluxAggregatorOptions, ...) Test
- func NewKeeperTest(testOptions KeeperTestOptions, env environment.Environment, ...) Test
- func NewOCRTest(testOptions OCRTestOptions, contractOptions contracts.OffchainOptions, ...) Test
- func NewVRFTest(testOptions VRFTestOptions, env environment.Environment, ...) Test
- type TestOptions
- type VRFJobMap
- type VRFProvingData
- type VRFTest
- type VRFTestOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerCoordinatorPair ¶ added in v0.0.5
type ConsumerCoordinatorPair struct {
// contains filtered or unexported fields
}
ConsumerCoordinatorPair consumer and coordinator pair
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 KeeperJobMap ¶ added in v0.0.5
type KeeperJobMap map[contracts.KeeperConsumer]map[client.Chainlink]string
KeeperJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type KeeperTest ¶ added in v0.0.5
type KeeperTest struct {
TestOptions KeeperTestOptions
Environment environment.Environment
Blockchain client.BlockchainClient
Wallets client.BlockchainWallets
Deployer contracts.ContractDeployer
// common contracts
Link contracts.LinkToken
GasFeed contracts.MockGasFeed
LinkFeed contracts.MockETHLINKFeed
Registry contracts.KeeperRegistry
Registrar contracts.UpkeepRegistrar
// contains filtered or unexported fields
}
KeeperTest is the implementation of Test that will configure and execute soak test of Keeper contracts & jobs
func (*KeeperTest) RecordValues ¶ added in v0.0.5
func (f *KeeperTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records Keeper metrics
func (*KeeperTest) Run ¶ added in v0.0.5
func (f *KeeperTest) Run() error
Run runs Keeper performance/soak test
func (*KeeperTest) Setup ¶ added in v0.0.5
func (f *KeeperTest) Setup() error
Setup setups Keeper performance/soak test
type KeeperTestOptions ¶ added in v0.0.5
type KeeperTestOptions struct {
TestOptions
PaymentPremiumPPB uint32
RegistryCheckGasLimit uint32
BlockCountPerTurn *big.Int
StalenessSeconds *big.Int
GasCeilingMultiplier uint16
RoundTimeout time.Duration
TestDuration time.Duration
}
KeeperTestOptions contains the parameters for the Keeper performance/soak test to be executed
type OCRJobMap ¶ added in v0.0.5
type OCRJobMap map[contracts.OffchainAggregator]map[client.Chainlink]string
OCRJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type OCRTest ¶ added in v0.0.5
type OCRTest struct {
TestOptions OCRTestOptions
ContractOptions contracts.OffchainOptions
Environment environment.Environment
Blockchain client.BlockchainClient
Wallets client.BlockchainWallets
Deployer contracts.ContractDeployer
// contains filtered or unexported fields
}
OCRTest is the implementation of Test that will configure and execute soak test of OCR contracts & jobs
func (*OCRTest) RecordValues ¶ added in v0.0.5
func (f *OCRTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records OCR metrics
type OCRTestOptions ¶ added in v0.0.5
type OCRTestOptions struct {
TestOptions
RoundTimeout time.Duration
AdapterValue int
TestDuration time.Duration
}
OCRTestOptions contains the parameters for the OCR soak test to be executed
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
func NewKeeperTest ¶ added in v0.0.5
func NewKeeperTest( testOptions KeeperTestOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, link contracts.LinkToken, ) Test
NewKeeperTest creates new Keeper performance/soak test
func NewOCRTest ¶ added in v0.0.5
func NewOCRTest( testOptions OCRTestOptions, contractOptions contracts.OffchainOptions, env environment.Environment, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, ) Test
NewOCRTest creates new OCR performance/soak test
func NewVRFTest ¶ added in v0.0.5
func NewVRFTest( testOptions VRFTestOptions, env environment.Environment, link contracts.LinkToken, blockchain client.BlockchainClient, wallets client.BlockchainWallets, deployer contracts.ContractDeployer, adapter environment.ExternalAdapter, ) Test
NewVRFTest creates new VRF performance/soak test
type TestOptions ¶
TestOptions number of contracts and rounds
type VRFJobMap ¶ added in v0.0.5
type VRFJobMap map[ConsumerCoordinatorPair]map[client.Chainlink]VRFProvingData
VRFJobMap is a custom map type that holds the record of jobs by the contract instance and the chainlink node
type VRFProvingData ¶ added in v0.0.5
VRFProvingData proving key and job ID pair
type VRFTest ¶ added in v0.0.5
type VRFTest struct {
TestOptions VRFTestOptions
ContractOptions contracts.OffchainOptions
Environment environment.Environment
Blockchain client.BlockchainClient
Wallets client.BlockchainWallets
Deployer contracts.ContractDeployer
// contains filtered or unexported fields
}
VRFTest is the implementation of Test that will configure and execute soak test of VRF contracts & jobs
func (*VRFTest) RecordValues ¶ added in v0.0.5
func (f *VRFTest) RecordValues(b ginkgo.Benchmarker) error
RecordValues records VRF metrics
type VRFTestOptions ¶ added in v0.0.5
type VRFTestOptions struct {
TestOptions
RoundTimeout time.Duration
TestDuration time.Duration
}
VRFTestOptions contains the parameters for the VRF soak test to be executed