efectn / go-orm-benchmarks

Advanced benchmarks for +15 Go ORMs.
MIT License
308 stars 33 forks source link

Update benchmark is flawed #5

Closed maroux closed 1 year ago

maroux commented 2 years ago

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.

efectn commented 2 years ago

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

maroux commented 2 years ago

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

efectn commented 2 years ago

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.