From f7b13fb5331189086cead173ee12cc3d669222be Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Tue, 8 Feb 2022 18:42:03 +0000 Subject: [PATCH] colexec: fix the benchmark of sorting UUIDs Previously, we used an incorrect type and incorrect element size. Release note: None --- pkg/sql/colexec/sort_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/sql/colexec/sort_test.go b/pkg/sql/colexec/sort_test.go index 2306acd24a86..c215fda5ecdf 100644 --- a/pkg/sql/colexec/sort_test.go +++ b/pkg/sql/colexec/sort_test.go @@ -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())