Skip to content

Commit

Permalink
Merge pull request #350 from vegaprotocol/349-update-perf-top-up-values
Browse files Browse the repository at this point in the history
Increase asset top up amounts
  • Loading branch information
jeremyletang authored Apr 24, 2024
2 parents 8602550 + 5c6ec2b commit 00f084a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions perftest/perftest.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ func (p *perfLoadTesting) depositTokens(assets map[string]string, opts Opts) err
time.Sleep(time.Millisecond * 5)
}
}
// Add some more to the special accounts as we might need it for price level orders
for t := 0; t < opts.MarketCount*30; t++ {
for v := 0; v < opts.LpUserCount; v++ {
err := topUpAsset(opts.FaucetURL, p.users[v].pubKey, asset, 1000000)
if err != nil {
return err
}
time.Sleep(time.Millisecond * 5)
}
}

}

// If the first user has no tokens, top everyone up
Expand All @@ -156,7 +167,7 @@ func (p *perfLoadTesting) depositTokens(assets map[string]string, opts Opts) err
}

// Add some more to the special accounts as we might need it for price level orders
for t := 0; t < opts.MarketCount*10; t++ {
for t := 0; t < opts.MarketCount*30; t++ {
for v := 0; v < opts.LpUserCount; v++ {
err := topUpAsset(opts.FaucetURL, p.users[v].pubKey, asset, 100000000)
if err != nil {
Expand Down Expand Up @@ -529,8 +540,8 @@ func (p *perfLoadTesting) sendSLAOrders(marketID string, deleteFirst bool, opts
} else {
commitmentAmount = uint64(1000000000.0 * p.stakeScale)
}
orderSizeBuy = (commitmentAmount / uint64(opts.StartingMidPrice) * 2)
orderSizeSell = (commitmentAmount / uint64(opts.StartingMidPrice) * 2) / 10
orderSizeBuy = (commitmentAmount / uint64(opts.StartingMidPrice) * 2) / 10
orderSizeSell = (commitmentAmount / uint64(opts.StartingMidPrice) * 2) / 50

for p := 0; p < opts.SLAPriceLevels; p++ {
// Send in an order for both buy and sell side to cover the commitment
Expand Down

0 comments on commit 00f084a

Please sign in to comment.