commit | e78aa2858e73725ad03f8d05fa630fd6a87fbb3b | [log] [tgz] |
---|---|---|
author | Dan Smith <upthewaterspout@apache.org> | Wed Dec 05 16:13:15 2018 -0800 |
committer | Dan Smith <upthewaterspout@apache.org> | Wed Dec 05 16:13:15 2018 -0800 |
tree | 45f4e1f27d6217c4bde23128cc79b29424522dc1 | |
parent | 0ee9ec6e0c57117c3e5fe472adbcb51e6f4c3206 [diff] |
Fixing the number of threads to 48 in all benchmarks
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, run the benchmark task and pass in a list of hosts.
For example:
./gradlew benchmark -Phosts=localhost,localhost,localhost -PoutputDir=/tmp/results
This project includes some scripts to automate running benchmarks in google cloud. See the README.md in the infrastructure/google_cloud directory.
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 { @Test public void run() throws Exception { TestRunners.defaultRunner().runTest(this::configure); } /** * 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()); } }
/** * 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; } }