The XAP c++ API benchmark framework provides a simple report of the average response time in different scenarios, running with different space topologies and activating different types of operations and space classes. You can import the report to any spread sheet (e.g. Excel) for further processing and for producing graphical results. You can plug-in your own space entry classes in case the ones provided with the benchmark do not fit your needs.
The benchmark source code can be found under:
The benchmark tests the following operations:
Benchmark Command Arguments
Here are the different command arguments that the c++ benchmark program accepts:
- <url> – Space url. This can be a remote clustered space or an embedded one.
- <warmups> – Number of runs before starting the actual benchmark
- <repeats> – Number of times to re-run the whole benchmark
- <threads> – Number of concurrent threads
- <iterations> – Total amount of entries in the space
- <payload> – Payload size for each entry (for Payload object type)
- <batch size> – Size for batch operations
- <Space Class Type> – Entry class/type. See Supported Space Class Types for details.
- <use transactions> – Whether to use transactions and their type. Options are: true|false|jini (true – use Local Transactions, jini - use Jini Transactions).
- <Test Name> (Optional) – Can have any of the operations listed in Benchmark Operations.
Supported Space Class Types
The benchmark can accept any of the following Class Types:
- Payload — Object that includes a Payload
stringfield type with variable size
- Mixed — Object with two
booleanfield and one
- Doubles — Object with 15
- PayloadFifo — Same as Payload, except that it uses fifo flag.
- ComplexObjectWithInnerBinaryPOJO — Aggregated object that includes an inner Payload field stored as binary type.
All the classes above inherit from benchmarkBase Class, which includes a
long type uid (Indexed field) and a
string based field storing the object UID.
Benchmark Command Examples
- Benchmark command example communicating with a remote space:
benchmark "jini://localhost/*/mySpace?NoWriteLease=true" 1 1 2 10000 1000 100 Payload false
- Benchmark command example communicating with an embedded space (collocated with the benchmark program running in the same process):
benchmark "/./mySpace?NoWriteLease=true" 1 1 2 10000 1000 100 Payload false
The benchmark produces an output file that includes the test name, its duration and the average throughput of the tested operation.
Benchmark Files Location
The benchmark program is located at:
The benchmark classes xml declaration file is located at:
The benchmark generated serializer code is located at:
The benchmark serializer DLL is located at:
The benchmark program executable is located at:
Adding your Space Class
To add your own Space Class into the benchmark framework you should add a class inherited from the Benchmark class and add your code.
You should add into the
<GigaSpaces Root>\cpp\examples\benchmark\serializer\benchmark.gs.xml your class space declaration that is supported by your new benchmark implementation.