Skip to content

Commit

Permalink
Merge pull request #76273 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…21.2-76246

release-21.2: colexec: fix the benchmark of sorting UUIDs
  • Loading branch information
yuzefovich authored Feb 9, 2022
2 parents ef92454 + f7b13fb commit 0efc6c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sql/colexec/sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ func BenchmarkSortUUID(b *testing.B) {
for _, constAbbrPct := range []int{0, 50, 75, 90, 100} {
name := fmt.Sprintf("rows=%d/cols=%d/constAbbrPct=%d", nBatches*coldata.BatchSize(), nCols, constAbbrPct)
b.Run(name, func(b *testing.B) {
// 8 (bytes / int64) * nBatches (number of batches) * coldata.BatchSize() (rows /
// 16 (bytes / int64) * nBatches (number of batches) * coldata.BatchSize() (rows /
// batch) * nCols (number of columns / row).
b.SetBytes(int64(8 * nBatches * coldata.BatchSize() * nCols))
b.SetBytes(int64(16 * nBatches * coldata.BatchSize() * nCols))
typs := make([]*types.T, nCols)
for i := range typs {
typs[i] = types.Bytes
typs[i] = types.Uuid
}
batch := testAllocator.NewMemBatchWithMaxCapacity(typs)
batch.SetLength(coldata.BatchSize())
Expand Down

0 comments on commit 0efc6c5

Please sign in to comment.