| commit | ab86586d09f281afaa8a4f42f98b929843ad2f82 | [log] [tgz] |
|---|---|---|
| author | Dan Smith <upthewaterspout@apache.org> | Mon Nov 19 16:15:48 2018 -0800 |
| committer | Dan Smith <dsmith@pivotal.io> | Tue Nov 27 12:18:30 2018 -0800 |
| tree | 86c6d2d58e47477d311009a49ddd969d1994fff8 | |
| parent | a79c5da7d92efdda2dd3d2aa23bd5e3c830cd258 [diff] |
GEODE-6081: Probe that uses HdrHistogram Adding a new probe that uses HdrHistogram to generate a summary with a mean and 99th percentile latency. HdrHistogram should be more accurate than yardsticks histogram probe. This probe currently just reports a one line summary, but we could consider replacing the existing percentile and throughtput probes with this thing in the future - it has its own file format for recording per sample histograms.
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; } }