Merge pull request #20 from grafana/test-approxBytesPerEntry-is-correct

Test that approxBytesPerEntry const is correct
This commit is contained in:
Marco Pracucci 2021-10-11 15:42:38 +02:00 committed by GitHub
commit 8bc1b41795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {