django / django-asv

Benchmarks for Django using asv
MIT License
40 stars 12 forks source link

model validation benchmark and utils.py added #3

Closed deepakdinesh1123 closed 8 months ago

deepakdinesh1123 commented 2 years ago

The model validation benchmark has been added to the models_bench directory.

deepakdinesh1123 commented 2 years ago

I ran the benchmarks against the branches starting from stable/2.2.x till main, there were no regressions.

smithdc1 commented 2 years ago

@deepakdinesh1123 -- did you want to have a go at rebasing this one?

deepakdinesh1123 commented 2 years ago

@smithdc1 I ran the benchmark now and the time took was 7.29±0.1μs should I add a few more model.full_clean() calls?

smithdc1 commented 2 years ago

Yes. I think that will be a good idea.

Having had a look at full_clean() it doesn't look like there is any caching of the result which takes place so should be fine to rerun. Maybe check that if you add 10x calls the duration goes up by a similar ratio.

deepakdinesh1123 commented 2 years ago

After adding more the calls the time took was 73.2±0.8μs. I'll commit the changes