dice
dice copied to clipboard
fix(benchmark): Reset store for each iteration in BenchmarkEvalMSET
- Create a new store for each iteration of the benchmark
- Ensures accurate performance measurement by starting with a clean state
- Prevents potential infinite loops or deadlocks caused by accumulated state
- Resolves issue with benchmark suite hanging indefinitely
Closes #385
Ran test locally
Running tool: /opt/homebrew/bin/go test -benchmem -run=^$ -bench ^BenchmarkEvalMSET$ github.com/dicedb/dice/core
goos: darwin
goarch: arm64
pkg: github.com/dicedb/dice/core
BenchmarkEvalMSET-10 50248 22360 ns/op 328741 B/op 24 allocs/op
PASS
ok github.com/dicedb/dice/core 1.615s