go-orm-benchmarks icon indicating copy to clipboard operation
go-orm-benchmarks copied to clipboard

Update benchmark is flawed

Open maroux opened this issue 2 years ago • 3 comments

Since Insert doesn't check for created Id for raw and ent, the inserted model's id is 0 and hence the subsequence update doesn't affect any rows, and hence the code if flawed.

maroux avatar Apr 23 '22 21:04 maroux

You're right. Update results are flawed. If you are free, can you send a PR? I'll be busy with other tasks for 3-4 days @maroux

efectn avatar Apr 23 '22 22:04 efectn

Additionally, I don't know why testing.B code is duplicated here instead of just using go test -bench :/

maroux avatar Apr 23 '22 22:04 maroux

Additionally, I don't know why testing.B code is duplicated here instead of just using go test -bench :/

I'll change benchmark suite by testing.Benchmark() on next week. I have a design in my mind.

efectn avatar Apr 23 '22 22:04 efectn