From 5e21c4e2873364d8d751d474e4f0a173dd3ef427 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Wed, 27 Jan 2021 16:05:11 +0000 Subject: [PATCH] added static { Jvm.init(); } --- src/test/java/examples/portfolio/PortfolioValueTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/examples/portfolio/PortfolioValueTest.java b/src/test/java/examples/portfolio/PortfolioValueTest.java index 64b8c59bd..c1ae44ea0 100644 --- a/src/test/java/examples/portfolio/PortfolioValueTest.java +++ b/src/test/java/examples/portfolio/PortfolioValueTest.java @@ -16,6 +16,7 @@ package examples.portfolio; +import net.openhft.chronicle.core.Jvm; import net.openhft.chronicle.core.values.LongValue; import net.openhft.chronicle.map.ChronicleMap; import net.openhft.chronicle.map.ChronicleMapBuilder; @@ -36,6 +37,10 @@ public class PortfolioValueTest { private static final int nThreads = Runtime.getRuntime().availableProcessors(); private static final int nRepetitions = 11; // 10 for computing average, throwing away the first one (warmup) + static { + Jvm.init(); + } + private static void computeValue(final ChronicleMap cache) throws ExecutionException, InterruptedException { computeValueUsingIterator(cache); }