diff --git a/tsdb/hashcache/series_hash_cache.go b/tsdb/hashcache/series_hash_cache.go index 964b057301..6680251a6c 100644 --- a/tsdb/hashcache/series_hash_cache.go +++ b/tsdb/hashcache/series_hash_cache.go @@ -13,7 +13,7 @@ const ( // approxBytesPerEntry is the estimated memory footprint (in bytes) of 1 cache // entry, measured with TestSeriesHashCache_MeasureApproximateSizePerEntry(). - approxBytesPerEntry = 28 + approxBytesPerEntry = 50 ) // SeriesHashCache is a bounded cache mapping the per-block series ID with diff --git a/tsdb/hashcache/series_hash_cache_test.go b/tsdb/hashcache/series_hash_cache_test.go index 375c8054d7..7c7d7c0758 100644 --- a/tsdb/hashcache/series_hash_cache_test.go +++ b/tsdb/hashcache/series_hash_cache_test.go @@ -66,7 +66,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") + require.Equal(t, approxBytesPerEntry, int((after.TotalAlloc-before.TotalAlloc)/numEntries), "approxBytesPerEntry constant is out date") } func TestSeriesHashCache_Concurrency(t *testing.T) {