`BenchmarkEvalMSET` benchmark test behaviour is inconsistent
How to reproduce?
$ cd core
$ /core go test -bench=. -test.benchmem
| 2024/08/22 00:33:48 possible cross protocol scripting attack detected. dropping the request.
| rand seed: 1724267028521704000Queue size : 3
| goos: darwin
| goarch: arm64
| pkg: github.com/dicedb/dice/core
| BenchmarkAOFWithExat-10 271 4498089 ns/op 32 B/op 1 allocs/op
| BenchmarkLargeByteArray1-10 1000000000 0.005893 ns/op 0 B/op 0 allocs/op
| BenchmarkLargeByteArray2-10 1 5055459959 ns/op 2159744 B/op 32003 allocs/op
The test suite forever halts at this point. There's an issue in the BenchmarkEvalMSET (If you comment this particular test whole suite runs perfectly fine)
Get the debug logs while benchmarking - GODEBUG=gctrace=1 go test -bench=. -test.benchmem
Probable issue:
It seems in each iteration, the store and required values are not getting initialized causing blockage
Hi is it okay if I give this a try?
Sure @sbshah97 Thanks for picking it up!
@JyotinderSingh please assign it to him.
Hi is it okay if I give this a try?
Assigned
Hi I'm going to be looking at this on Tuesday. Slightly caught up on the weekend.
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
Fixed this and tested on local running only the test. Earlier it was not running, runs now based on the above hints. Sending MR now.