commit | d9da1dbf234f8baf91d4aad09fa97e02582718a5 | [log] [tgz] |
---|---|---|
author | Sean Goller <sean@goller.net> | Thu Nov 15 09:24:12 2018 -0800 |
committer | Sean Goller <sean@goller.net> | Thu Nov 15 09:24:12 2018 -0800 |
tree | 38fa4a10ed6384ddeb2b7766fcb1af5a68b488aa | |
parent | f4ab7257409ae59be5744afc472a8e53c59106a5 [diff] |
Disable strict host checking, when sshing into the testing image.
This project contains a benchmarking framework and benchmarks for Apache Geode. It is based on the yardstick framework, but with a java based test configuration and test execution framework.
These benchmarks are under development.
The benchmarks require machines with passwordless ssh enabled in order to run.
To run all benchmarks locally, execute
./gradlew geode-benchmarks:test
To run all benchmarks on multiple hosts, execute
export TEST_HOSTS="host1,host2,host2" ./gradlew geode-benchmarks:test
Performance results will be written to geode-benchmarks/output
The project is divided into two modules
Benchmarks are defined in a declarative configuration classes. Each configuration class is run as a junit test which calls the configure method and passes it to the TestRunner, which executes the test on the provided TEST_HOSTS.
Benchmarks are composed of before tasks
, after tasks
, and workload tasks
. The before
and after
tasks are run once. Workload
tasks are run repeatedly and their execution time is measured and reported by the yardstick framework.
/** * Benchmark configuration class, which defines the topology of the test and * the initialization tasks and workload tasks for the test. */ public class PartitionedPutBenchmark { /** * Declare the configuration of the test by calling methods * on TestConfig. */ public void configure(TestConfig config) { int locatorPort = 10334; //This test has three roles, a geode locator, server, and client config.role("locator", 1); config.role("server", 1); config.role("client", 1); //Define how the locator,server and client are initialized config.before(new StartLocator(locatorPort), "locator"); config.before(new StartServer(locatorPort), "server"); config.before(new StartClient(locatorPort), "client"); //Define the benchmarked workload, which runs in a client config.workload(new PutTask(), 5 /*warmup time*/, 30 /*measurement time*/, "client"); } }
/** * Workload task, which extends the yardstick BenchmarkDriverAdapter * * Workload tasks should execute a single unit of work, and will be run repeatedly * for the duration of the test. */ public class PutTask extends BenchmarkDriverAdapter implements Serializable { @Override public boolean test(Map<Object, Object> ctx) throws Exception { region.put(1,2); return true; } }