mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #20 from grafana/test-approxBytesPerEntry-is-correct
Test that approxBytesPerEntry const is correct
This commit is contained in:
commit
8bc1b41795
|
@ -64,6 +64,7 @@ func TestSeriesHashCache_MeasureApproximateSizePerEntry(t *testing.T) {
|
||||||
runtime.ReadMemStats(&after)
|
runtime.ReadMemStats(&after)
|
||||||
|
|
||||||
t.Logf("approximate size per entry: %d bytes", (after.TotalAlloc-before.TotalAlloc)/numEntries)
|
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) {
|
func TestSeriesHashCache_Concurrency(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue