Test that approxBytesPerEntry const is correct

The comment on the constant mentions where it comes from, so we can
actually check its value in that test.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
owilliams/utf8-02-mimir
Oleg Zaytsev 3 years ago
parent 62935a1241
commit 3dd18a1ece
No known key found for this signature in database
GPG Key ID: 7E9FE9FD48F512EF

@ -64,6 +64,7 @@ func TestSeriesHashCache_MeasureApproximateSizePerEntry(t *testing.T) {
runtime.ReadMemStats(&after)
t.Logf("approximate size per entry: %d bytes", (after.TotalAlloc-before.TotalAlloc)/numEntries)
require.Equal(t, uint64(approxBytesPerEntry), (after.TotalAlloc-before.TotalAlloc)/numEntries, "approxBytesPerEntry constant is out date")
}
func TestSeriesHashCache_Concurrency(t *testing.T) {

Loading…
Cancel
Save