-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: add load test for active orders (#472)
* fix: active orders overflow bug * chore: active orders observability TODOs * updates * lint * add concurrency to the order book processing in active orders * active order fault tolerance * perf: add load test for active orders * add godocs --------- Co-authored-by: Deividas Petraitis <[email protected]>
- Loading branch information
1 parent
bc570d6
commit e6d44b6
Showing
4 changed files
with
54 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from locust import HttpUser, task | ||
from pairs import * | ||
|
||
fill_bot_address = "osmo10s3vlv40h64qs2p98yal9w0tpm4r30uyg6ceux" | ||
|
||
class OrderbookActiveOrders(HttpUser): | ||
# on_start is called when a Locust start before any task is scheduled. | ||
def on_start(self): | ||
pass | ||
|
||
# on_stop is called when the TaskSet is stopping | ||
def on_stop(self): | ||
pass | ||
|
||
|
||
@task | ||
def quoteUOSMOUSDC_1In(self): | ||
self.client.get(f"passthrough/active-orders?userOsmoAddress={fill_bot_address}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from locust import HttpUser, task | ||
from pairs import * | ||
import random | ||
|
||
# random addresses with balances | ||
addr1 = "osmo1044qatzg4a0wm63jchrfdnn2u8nwdgxxt6e524" | ||
addr2 = "osmo1aaa9rpq2m6tu6t0dvknqq2ps7zudxv7th209q4" | ||
addr3 = "osmo18sd2ujv24ual9c9pshtxys6j8knh6xaek9z83t" | ||
addr4 = "osmo140p7pef5hlkewuuramngaf5j6s8dlynth5zm06" | ||
|
||
addresses = [addr1, addr2, addr3, addr4] | ||
|
||
class PassthroughPortfolioBalances(HttpUser): | ||
@task | ||
def passthroughTotalCoins(self): | ||
random_address = random.choice(addresses) | ||
self.client.get(f"/passthrough/portfolio-assets/{random_address}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters