https://github.com/yuce/hazelcast-go-client-benchmark
https://github.com/yuce/hazelcast-go-client-benchmark
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuce/hazelcast-go-client-benchmark
- Owner: yuce
- License: apache-2.0
- Created: 2022-07-30T10:23:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-09T11:09:21.000Z (almost 4 years ago)
- Last Synced: 2025-11-13T05:35:38.634Z (8 months ago)
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hazelcast Go Client Benchmark
**Requirements**
* Go 1.18
## Build
$ git clone https://github.com/yuce/hazelcast-go-client-benchmark.git
$ go build .
## Usage
Run `./hazelcast-go-client-benchmark` with a configuration file, e.g.,:
$ ./hazelcast-go-client-benchmark configs/128x1024_500keys_nc.json
## Configuration
Here's a sample JSON configuration:
"Client": {
"Cluster": {
"Network": {
"Addresses": [
"localhost:5701"
]
}
},
"NearCaches": [
{
"Name": "mymap*",
"InMemoryFormat": "binary",
"Eviction": {
"Policy": "lru",
"Size": 500
}
}
]
},
"MapName": "mymap1",
"KeyCount": 500,
"Repeat": 100,
"GoroutineCount": 1,
"EntryGenerator": "sized128x1024",
"Warmup": false
}
Check out https://pkg.go.dev/github.com/hazelcast/hazelcast-go-client#hdr-Configuration for the `Client` configuration.
The program configuration is in `config.go` in this project.
The config fields can be mapped to JSON fields straightforwardly.
The following program configuration keys are supported:
* `MapName`: Map name to be used during the benchmark.
* `KeyCount`: Number of unique keys to be used.
* `Repeat`: Number of `Map.Get`s to do (after the warmup, if configured)
* `GoroutineCount`: Number of goroutines to do `Map.Get`s.
* `Warmup`: If `true`, runs populates the Near Cache before starting the benchmark.
* `Client`: Hazelcast client configuration. Check out https://pkg.go.dev/github.com/hazelcast/hazelcast-go-client#hdr-Configuration.
* `EntryGenerator`: Entry generator to use for generating keys and values. See the section below.
## Entry Generator
Checkout `entry_generators.go` for sample entry generators and how to add yours.
Here are the builtin ones:
* `identity`: Both keys and values are the `int64` index.
* `sized128x1024`: String key of size 128 bytes, value of size 1024 bytes.
* `sized128x4096`: String key of size 128 bytes, value of size 4096 bytes.
## License
See: [LICENSE](LICENSE)