Skip to content

Commit

Permalink
Merge #113681
Browse files Browse the repository at this point in the history
113681: roachtest: fix qps parse in kvrestart test r=andrewbaptist a=kvoli

The `kv/restart/nodes=12` test could fail when failing to parse the QPS metric value into a uint64. Parse as a float64, then later convert.

Epic: none
Release note: None

Co-authored-by: Austen McClernon <austen@cockroachlabs.com>
  • Loading branch information
craig[bot] and kvoli committed Nov 2, 2023
2 parents 0045f69 + cbc01a4 commit e65bc94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/roachtest/tests/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,13 @@ func measureQPS(
db := db
go func() {
defer wg.Done()
var v uint64
var v float64
if err := db.QueryRowContext(
ctx, `SELECT value FROM crdb_internal.node_metrics WHERE name = 'sql.insert.count'`,
).Scan(&v); err != nil {
t.Fatal(err)
}
atomic.AddUint64(&value, v)
atomic.AddUint64(&value, uint64(v))
}()
}
wg.Wait()
Expand Down

0 comments on commit e65bc94

Please sign in to comment.