This repository contains a Go implemenetation of AnchorHash based on the paper AnchorHash: A Scalable Consistent Hash.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- get all dependencies:
go get github.com/golang-collections/collections/stack go get github.com/spaolacci/murmur3
- if you went to use the benchmarks analysis
benchstat
you can download it useing:and make sure it is installed using command:go get golang.org/x/perf/cmd/benchstat
benchstat
- Clone the repository (inside your local GOPATH or GOROOT) and cd into it:
git clone https://github.com/anchorhash #inside your local GOPATH or GOROOT cd anchorhash
you can run the tests by executing the following commands from the root directory.
- running the rate benchmarks: (WIP this part should be according to new directories structure)
- ratio benchmark
go test ./benchmarks/rate -parallel 1 -benchtime=50x -cpu 1 -count 5 -bench=BenchmarkRatioRate >ratio_benchmark.out benchstat ratio_benchmark.out
- load benchmark
go test ./benchmarks/rate -parallel 1 -benchtime=50x -cpu 1 -count 5 -bench=BenchmarkLoadRate >load_benchmark.out benchstat load_benchmark.out
- ratio benchmark
- running the consistency test:
go run tests/consistency/ManualConsistencyUnitTest.go tests/consistency/TestConsistency.go
- running the balance test:
go run tests/balance/ManualBalanceUnitTest.go tests/balance/TestBalance.go
- anchor hash implementation
- tests and benchmarks:
add Authors
add License