kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-5095: Adjust accepted overhead for ThreadCacheTest
Date Thu, 20 Apr 2017 21:55:47 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 492306257 -> f18a14af3


KAFKA-5095: Adjust accepted overhead for ThreadCacheTest

Author: Eno Thereska <eno@confluent.io>

Reviewers: Damian Guy, Guozhang Wang

Closes #2877 from enothereska/KAFKA-5095-cacheOverheads


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/f18a14af
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/f18a14af
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/f18a14af

Branch: refs/heads/trunk
Commit: f18a14af361f24851664b428b46d5789f51a80ea
Parents: 4923062
Author: Eno Thereska <eno@confluent.io>
Authored: Thu Apr 20 14:55:43 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Apr 20 14:55:43 2017 -0700

----------------------------------------------------------------------
 .../apache/kafka/streams/state/internals/ThreadCacheTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/f18a14af/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
index af70291..43a03f1 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
@@ -103,7 +103,7 @@ public class ThreadCacheTest {
     public void cacheOverheadsSmallValues() {
         Runtime runtime = Runtime.getRuntime();
         double factor = 0.05;
-        double systemFactor = 2.5;
+        double systemFactor = 3; // if I ask for a cache size of 10 MB, accept an overhead
of 3x, i.e., 30 MBs might be allocated
         long desiredCacheSize = Math.min(100 * 1024 * 1024L, runtime.maxMemory());
         int keySizeBytes = 8;
         int valueSizeBytes = 100;
@@ -115,7 +115,7 @@ public class ThreadCacheTest {
     public void cacheOverheadsLargeValues() {
         Runtime runtime = Runtime.getRuntime();
         double factor = 0.05;
-        double systemFactor = 1.5;
+        double systemFactor = 2; // if I ask for a cache size of 10 MB, accept an overhead
of 2x, i.e., 20 MBs might be allocated
         long desiredCacheSize = Math.min(100 * 1024 * 1024L, runtime.maxMemory());
         int keySizeBytes = 8;
         int valueSizeBytes = 1000;


Mime
View raw message