Skip to content
Permalink
Browse files
Changing the test parameters (#37)
        * Changing the test data package name to be able to run old geode versions
	* Test create smaller JVM for travis to be able to run it.
  • Loading branch information
nabarunnag committed Jan 9, 2019
1 parent 52115d5 commit e3c3ae8c74b72da0665596b4ffca2717d47e26dc
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 8 deletions.
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.benchmark.geode.data;
package benchmark.geode.data;


import java.util.Arrays;
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.benchmark.geode.data;
package benchmark.geode.data;


import java.util.ArrayList;
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.benchmark.geode.data;
package benchmark.geode.data;


public class Position {
@@ -30,7 +30,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import org.apache.benchmark.geode.data.Portfolio;
import benchmark.geode.data.Portfolio;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -21,7 +21,7 @@
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;

import org.apache.benchmark.geode.data.Portfolio;
import benchmark.geode.data.Portfolio;
import org.yardstickframework.BenchmarkConfiguration;
import org.yardstickframework.BenchmarkDriverAdapter;

@@ -46,7 +46,7 @@ public void run(TestContext context) throws Exception {
String statsFile = new File(context.getOutputDir(), "stats.gfs").getAbsolutePath();

ClientCache clientCache = new ClientCacheFactory(GeodeProperties.clientProperties())
.setPdxSerializer(new ReflectionBasedAutoSerializer("org.apache.benchmark.geode.data.*"))
.setPdxSerializer(new ReflectionBasedAutoSerializer("benchmark.geode.data.*"))
.addPoolLocator(locator.getHostAddress(), locatorPort)
.set(ConfigurationProperties.STATISTIC_ARCHIVE_FILE, statsFile)
.create();
@@ -46,7 +46,7 @@ public void run(TestContext context) throws Exception {
String locatorString = LocatorUtil.getLocatorString(context, locatorPort);
String statsFile = new File(context.getOutputDir(), "stats.gfs").getAbsolutePath();
Cache cache = new CacheFactory(GeodeProperties.serverProperties())
.setPdxSerializer(new ReflectionBasedAutoSerializer("org.apache.benchmark.geode.data.*"))
.setPdxSerializer(new ReflectionBasedAutoSerializer("benchmark.geode.data.*"))
.set(ConfigurationProperties.LOCATORS, locatorString)
.set(ConfigurationProperties.NAME,
"server-" + context.getJvmID() + "-" + InetAddress.getLocalHost())
@@ -22,7 +22,7 @@
import java.util.stream.Collectors;
import java.util.stream.LongStream;

import org.apache.benchmark.geode.data.Portfolio;
import benchmark.geode.data.Portfolio;
import org.junit.jupiter.api.Test;

class PrePopulateRegionTest {
@@ -41,6 +41,34 @@ public class TestRunners {
public static final String TEST_HOSTS = "TEST_HOSTS";
public static final String OUTPUT_DIR = "OUTPUT_DIR";

public static final String[] JVM_ARGS_SMALL_SIZE = new String[] {
"-XX:CMSInitiatingOccupancyFraction=60",
"-XX:+PrintGCDetails",
"-XX:+PrintGCTimeStamps",
"-XX:+PrintGCDateStamps",
"-XX:+PrintGCApplicationStoppedTime",
"-XX:+PrintGCApplicationConcurrentTime",
"-XX:+UseGCLogFileRotation",
"-XX:NumberOfGCLogFiles=20",
"-XX:GCLogFileSize=1M",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:ParGCCardsPerStrideChunk=32768",
"-XX:+UseNUMA",
"-XX:+UseConcMarkSweepGC",
"-XX:+UseCMSInitiatingOccupancyOnly",
"-XX:+CMSClassUnloadingEnabled",
"-XX:+DisableExplicitGC",
"-XX:+ScavengeBeforeFullGC",
"-XX:+CMSScavengeBeforeRemark",
"-server",
"-Djava.awt.headless=true",
"-Dsun.rmi.dgc.server.gcInterval=9223372036854775806",
"-Dgemfire.OSProcess.ENABLE_OUTPUT_REDIRECTION=true",
"-Dgemfire.launcher.registerSignalHandlers=true",
"-Xmx4g",
"-Xms4g"

};

public static TestRunner defaultRunner(String username, File outputDir, String... hosts) {
return new DefaultTestRunner(
@@ -82,6 +110,10 @@ public void runTest(TestConfig config, String testName) throws Exception {
config.warmupSeconds(0);
config.durationSeconds(1);
config.threads(1);
config.getRoles().entrySet().stream().forEach(entry -> {
config.jvmArgs(entry.getKey(), JVM_ARGS_SMALL_SIZE);
});

super.runTest(config, testName);
}
};

0 comments on commit e3c3ae8

Please sign in to comment.