Summary: The Benchmark Example measures the performance of several GigaSpaces .Net API operations.
OverviewThe Benchmark Example is used to measure simple space operation throughput. You can customize the example and run a benchmark on customized scenarios and objects. There are two options for using the benchmark: 1. Out-of-the-box benchmark. Use the Benchmark Example and customize the Benchmark run:
For more information please read XAP66:Out-of-the-box benchmark 2. Develop a custom benchmark with your own code for the benchmark scenario and the benchmark object. You can create your own benchmark by using the Benchmark Framework:
For more information please read XAP66:Develop a custom benchmark The structure of the XAP66:configuration xml file is the same for the two benchmark options. Option 1: Out-of-the-box BenchmarkThe syntax of the command line for running the out-of-the-box benchmark is as follows: ..\..\lib\GigaSpaces.Core.Benchmarks.Launcher.exe {space-url} {Input xml} {Results xml} space-url - The url for finding the Space. You can control the Space topology by changing the space-url parameter. "/./benchmarkSpace?NoWriteLease=true&schema=cache&groups=myGroup"
Remote: "jini://localhost/*/remoteBenchmarkSpace?NoWriteLease=true&groups=myGroup"
Input xml - Location of the xml file that contains the benchmark run configuration. The default is Xmls\BenchmarkPerson.xml. The configuration file includes the following information:
The Benchmark elements contain the following parameters:
Example: <type>GigaSpaces.Core.Benchmarks.Implementations.Basic.ReadBenchmark`2[[GigaSpaces.Core.Benchmarks.Implementations.Basic.Objects.Person, GigaSpaces.Core.Benchmarks.Implementations.Basic],[GigaSpaces.Core.Benchmarks.Implementations.Basic.ObjectAdapters.PersonAdapter, GigaSpaces.Core.Benchmarks.Implementations.Basic]], GigaSpaces.Core.Benchmarks.Implementations.Basic</type>
Option 2: Develop a Custom BenchmarkDevelop a custom benchmark with your own code for the benchmark scenario and the benchmark object. 1. Use the Benchmark Framework:
2. Prepare the inputs for your benchmark run:
<type>GigaSpaces.Core.Benchmarks.Implementations.Basic.ReadBenchmark`2 [[GigaSpaces.Core.Benchmarks.Implementations.Basic.Objects. MyObject, GigaSpaces.Core.Benchmarks.Implementations.Basic], [GigaSpaces.Core.Benchmarks.Implementations.Basic.ObjectAdapters. MyObjectAdapter, GigaSpaces.Core.Benchmarks.Implementations.Basic]], GigaSpaces.Core.Benchmarks.Implementations.Basic </type> 3. For running the customized benchmark, follow the steps below in Building and Running the Example Building and Running the Example
Both run scripts use the following pattern: ..\..\lib\GigaSpaces.Core.Benchmarks.Launcher.exe {space-url} {Input xml} {Results xml} Example command line for running an embedded benchmark run: ..\..\lib\GigaSpaces.Core.Benchmarks.Launcher.exe "/./benchmarkSpace?NoWriteLease=true&schema=cache&groups=myGroup"
Xmls\BenchmarkPerson.xml Results\EmbeddedBenchmarkPersonResult.xml
Example Configuration FileThe Input xml structure is the same for the two benchmark options (the Out-of-the-box benchmark and the Customized benchmark).
Example configuration file: <?xml version="1.0" encoding="UTF-8"?> <benchmarks> !--Defines an additional assembly that needs to be loaded, in this case the benchmark implementation assembly Each assembly should be defined in a new <addembly> element--> <assembly> <path>..\..\lib\GigaSpaces.Core.Benchmarks.Implementations.Basic.dll</path> </assembly> <!--Define one benchmark that will run, each benchmark should be defined in a new <benchmark> element--> <benchmark> <!--Define the benchmark type name, it is recommended to use Fully Qualifed names, The type structure is: <Benchmark type name>'2[[Object type name],[Object adapter type name]]--> <type>GigaSpaces.Core.Benchmarks.Implementations.Basic.ReadBenchmark`2 [[GigaSpaces.Core.Benchmarks.Implementations.Basic.Objects.Person, GigaSpaces.Core.Benchmarks.Implementations.Basic], [GigaSpaces.Core.Benchmarks.Implementations.Basic.ObjectAdapters.PersonAdapter, GigaSpaces.Core.Benchmarks.Implementations.Basic]], GigaSpaces.Core.Benchmarks.Implementations.Basic</type> <!--Number of times to repeat the benchmark--> <repeats>100</repeats> <!--Number of repeats that will count as warm up repeats and will not be taken into consideration when calculating the benchmark performance results--> <warmups>10</warmups> <!--The batch size of the operation, single operation use chunk size of 0, this is relevent to multiple benchmarks such as writemultiple--> <chunks>0</chunks> <!--Number of execution of the benchmark single operation in each repeat--> <executions>1000</executions> <!--Use this field to manually enlarge the size of the Object (in bytes)--> <payload>100</payload> <!--Transaction type, available (None, Jini, Local)--> <txn-type>None</txn-type> <!--Should display detailed info of each repeat--> <show-info>true</show-info> <!--Number of concurrent threads that will execute this benchmark--> <threads>1</threads> </benchmark> </benchmark> ... </benchmark> ... </benchmarks> |
![]() |
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence |