List of usage examples for io.netty.util.internal SystemPropertyUtil getInt
public static int getInt(String key, int def)
From source file:ai.grakn.test.benchmark.BenchmarkTest.java
License:Open Source License
private int getWarmupIterations() { return SystemPropertyUtil.getInt("warmupIterations", -1); }
From source file:ai.grakn.test.benchmark.BenchmarkTest.java
License:Open Source License
private int getMeasureIterations() { return SystemPropertyUtil.getInt("measureIterations", -1); }
From source file:sailfish.remoting.RecycleTest.java
License:Apache License
@Test public void testRecycleInSyncThread() throws Exception { //recycle// ww w . j a v a 2 s .c om Resource2 resource1 = Resource2.newInstance(); resource1.recycle(); //don't recycle resource1 = Resource2.newInstance(); Resource2 temp = null; // By default we allow one push to a Recycler for each 8th try on handles that were never recycled before. // This should help to slowly increase the capacity of the recycler while not be too sensitive to allocation // bursts. int stackDefaultRatioMask = SystemPropertyUtil.getInt("io.netty.recycler.ratio", 8) - 1; for (int i = 0; i < stackDefaultRatioMask; i++) { temp = Resource2.newInstance(); temp.recycle(); Assert.assertTrue(temp != Resource2.newInstance()); } temp = Resource2.newInstance(); temp.recycle(); Assert.assertTrue(temp == Resource2.newInstance()); }