Skip to content

Commit

Permalink
Merge pull request #100849 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-100821

release-23.1: cmd/roachtest: adjust disk-stalled roachtests TPS calculation
  • Loading branch information
jbowens authored Apr 11, 2023
2 parents 64903e1 + 0dc1f64 commit 115b02c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions pkg/cmd/roachtest/tests/disk_stall.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,12 @@ func runDiskStalledDetection(
}

// Let the workload continue after the stall.
{
workloadPauseDur := 10*time.Minute - timeutil.Since(workloadStartAt)
t.Status("letting workload continue for ", workloadPauseDur, " with n1 stalled")
select {
case <-ctx.Done():
t.Fatal(ctx.Err())
case <-time.After(workloadPauseDur):
}
workloadAfterDur := 10*time.Minute - timeutil.Since(workloadStartAt)
t.Status("letting workload continue for ", workloadAfterDur, " with n1 stalled")
select {
case <-ctx.Done():
t.Fatal(ctx.Err())
case <-time.After(workloadAfterDur):
}

{
Expand All @@ -226,7 +224,7 @@ func runDiskStalledDetection(
cum := response.Results[0].Datapoints
totalTxnsPostStall := cum[len(cum)-1].Value - totalTxnsPreStall
preStallTPS := totalTxnsPreStall / stallAt.Sub(workloadStartAt).Seconds()
postStallTPS := totalTxnsPostStall / now.Sub(stallAt).Seconds()
postStallTPS := totalTxnsPostStall / workloadAfterDur.Seconds()
t.L().PrintfCtx(ctx, "%.2f total transactions committed after stall\n", totalTxnsPostStall)
t.L().PrintfCtx(ctx, "pre-stall tps: %.2f, post-stall tps: %.2f\n", preStallTPS, postStallTPS)
if postStallTPS < preStallTPS/2 {
Expand Down

0 comments on commit 115b02c

Please sign in to comment.