提交 eb432bf6 authored 作者: Andrei Tokar's avatar Andrei Tokar

adjust test

上级 74873e9d
...@@ -117,8 +117,8 @@ public class TestCacheLongKeyLIRS extends TestBase { ...@@ -117,8 +117,8 @@ public class TestCacheLongKeyLIRS extends TestBase {
test.put(j, j); test.put(j, j);
} }
// for a cache of size 1000, // for a cache of size 1000,
// there are 63 cold entries (about 6.25%). // there are 32 cold entries (about 1/32).
assertEquals(63, test.size() - test.sizeHot()); assertEquals(32, test.size() - test.sizeHot());
// at most as many non-resident elements // at most as many non-resident elements
// as there are entries in the stack // as there are entries in the stack
assertEquals(1000, test.size()); assertEquals(1000, test.size());
...@@ -333,7 +333,7 @@ public class TestCacheLongKeyLIRS extends TestBase { ...@@ -333,7 +333,7 @@ public class TestCacheLongKeyLIRS extends TestBase {
} }
assertEquals(100, test.size()); assertEquals(100, test.size());
assertEquals(200, test.sizeNonResident()); assertEquals(200, test.sizeNonResident());
assertEquals(90, test.sizeHot()); assertEquals(96, test.sizeHot());
} }
private void testLimitNonResident() { private void testLimitNonResident() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论