dice icon indicating copy to clipboard operation
dice copied to clipboard

fix(benchmark): Reset store for each iteration in BenchmarkEvalMSET

Open sbshah97 opened this issue 1 year ago • 0 comments

  • 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

sbshah97 avatar Aug 28 '24 23:08 sbshah97