add basic timers

This commit is contained in:
Anton Evangelatov 2020-07-06 17:49:42 +02:00
parent 4ce21af7de
commit dd3d04fed2
2 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,69 @@
[metadata]
name = "lotus-soup"
author = ""
[global]
plan = "lotus-soup"
case = "deals-stress-test"
total_instances = 6
builder = "docker:go"
runner = "cluster:k8s"
[global.build_config]
push_registry=true
go_proxy_mode="remote"
go_proxy_url="http://localhost:8081"
registry_type="aws"
[global.build]
selectors = ["testground"]
[global.run_config]
exposed_ports = { pprof = "6060", node_rpc = "1234", miner_rpc = "2345" }
[global.run.test_params]
clients = "3"
miners = "2"
genesis_timestamp_offset = "0"
balance = "200000"
sectors = "100"
random_beacon_type = "mock"
[[groups]]
id = "bootstrapper"
[groups.resources]
memory = "4096Mi"
cpu = "1000m"
[groups.instances]
count = 1
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "bootstrapper"
[[groups]]
id = "miners"
[groups.resources]
memory = "12000Mi"
cpu = "1000m"
[groups.instances]
count = 2
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "miner"
mining_mode = "natural"
[[groups]]
id = "clients"
[groups.resources]
memory = "4096Mi"
cpu = "1000m"
[groups.instances]
count = 3
percentage = 0.0
[groups.run]
[groups.run.test_params]
role = "client"
deals = "10"
deal_mode = "concurrent"

View File

@ -90,11 +90,13 @@ func dealStressTest(t *testkit.TestEnvironment) error {
wg1.Add(1)
go func(i int) {
defer wg1.Done()
t1 := time.Now()
deal := testkit.StartDeal(ctx, minerAddr.ActorAddr, client, cids[i])
t.RecordMessage("started storage deal %d -> %s", i, deal)
time.Sleep(2 * time.Second)
t.RecordMessage("waiting for deal %d to be sealed", i)
testkit.WaitDealSealed(t, ctx, client, deal)
t.D().ResettingHistogram("deal.sealed").Update(int64(time.Since(t1)))
}(i)
}
t.RecordMessage("waiting for all deals to be sealed")
@ -107,8 +109,10 @@ func dealStressTest(t *testkit.TestEnvironment) error {
go func(i int) {
defer wg2.Done()
t.RecordMessage("retrieving data for deal %d", i)
t1 := time.Now()
testkit.RetrieveData(t, ctx, client, cids[i], true, data[i])
t.RecordMessage("retrieved data for deal %d", i)
t.D().ResettingHistogram("deal.retrieved").Update(int64(time.Since(t1)))
}(i)
}
t.RecordMessage("waiting for all retrieval deals to complete")