| commit | 392ecd96ac96a097903f848f61677d34817f2f14 | [log] [tgz] |
|---|---|---|
| author | Dan Smith <upthewaterspout@apache.org> | Thu Nov 15 16:43:39 2018 -0800 |
| committer | Dan Smith <upthewaterspout@apache.org> | Tue Nov 27 10:19:31 2018 -0800 |
| tree | b83fae083d8175b40ffc7c30ce17e0b54ec79337 | |
| parent | d0675fd40310f4e4333a9f8489abdd54ded56f28 [diff] |
Adding scripts to automate launching VMs in google cloud These scripts launch 4 instances in your default gcp account, assuming you have configured the gcloud script on your machine. Create an image in your default project, region and zone ./build_image.sh Launch 4 instances in your default zone and subnet ./launch_cluster somename default Run the benchmarks and copy the results down ./run_tests.sh somename Delete your cluster ./destroy_cluster somename Co-authored-by: Sean Goller <sgoller@pivotal.io>
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
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; } }