Skip to content

Commit

Permalink
Make DeltaStage Configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Nov 7, 2023
1 parent 302eb05 commit aa02ff5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integration-tests/benchmark/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ var (
LinkTokenAddress = getEnv("LINKTOKENADDRESS", "")
EthFeedAddress = getEnv("ETHFEEDADDRESS", "")
GasFeedAddress = getEnv("GASFEEDADDRESS", "")
DeltaStageSeconds, _ = strconv.ParseInt(getEnv("DELTASTAGESECONDS", "0"), 0, 64)
)

type NetworkConfig struct {
Expand All @@ -151,6 +152,10 @@ func TestAutomationBenchmark(t *testing.T) {
l.Info().Str("Test Name", testName).Str("Test Inputs", os.Getenv("TEST_INPUTS")).Msg("Running Benchmark Test")
benchmarkTestNetwork := networkConfig[networkName]

if DeltaStageSeconds > 0 {
benchmarkTestNetwork.deltaStage = time.Duration(DeltaStageSeconds) * time.Second
}

l.Info().Str("Namespace", testEnvironment.Cfg.Namespace).Msg("Connected to Keepers Benchmark Environment")

chainClient, err := blockchain.NewEVMClient(benchmarkNetwork, testEnvironment, l)
Expand Down Expand Up @@ -261,7 +266,7 @@ var networkConfig = map[string]NetworkConfig{
funding: big.NewFloat(ChainlinkNodeFunding),
},
"ArbitrumGoerli": {
upkeepSLA: int64(20),
upkeepSLA: int64(120),
blockTime: time.Second,
deltaStage: time.Duration(0),
funding: big.NewFloat(ChainlinkNodeFunding),
Expand Down
1 change: 1 addition & 0 deletions integration-tests/testsetups/keeper_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (k *KeeperBenchmarkTest) Setup(env *environment.Environment) {
k.keeperConsumerContracts = make([]contracts.AutomationConsumerBenchmark, len(inputs.RegistryVersions))
k.upkeepIDs = make([][]*big.Int, len(inputs.RegistryVersions))
k.log.Debug().Interface("TestInputs", inputs).Msg("Setting up benchmark test")
k.log.Info().Str("Network", inputs.BlockchainClient.GetNetworkName()).Dur("DeltaStage", inputs.DeltaStage).Msg("Starting Keeper Benchmark Test Setup")

var err error
// Connect to networks and prepare for contract deployment
Expand Down

0 comments on commit aa02ff5

Please sign in to comment.