diff --git a/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml b/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml new file mode 100644 index 000000000..e43b6f9bb --- /dev/null +++ b/lotus-soup/compositions/stress-test-concurrent-natural-k8s.toml @@ -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" diff --git a/lotus-soup/deals_stress.go b/lotus-soup/deals_stress.go index 88a735bd5..a5d2d3ac7 100644 --- a/lotus-soup/deals_stress.go +++ b/lotus-soup/deals_stress.go @@ -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")