flopy
flopy copied to clipboard
feature: expand benchmarking
Is your feature request related to a problem? Please describe.
FloPy currently has a very small set of benchmarks using pytest-benchmark, including
- init/load/write time for a small test model: https://github.com/modflowpy/flopy/blob/3e176d0d668675ae2372106ffe1efc829debad38/autotest/test_modflow.py#L1352
- MP7 pathline/endpoint data load time: https://github.com/modflowpy/flopy/blob/3e176d0d668675ae2372106ffe1efc829debad38/autotest/test_modpathfile.py#L264
It might be worthwhile to a) benchmark a broader set of models/utils, and b) minimize ad hoc code needed to achieve this.
Describe the solution you'd like
Maybe benchmark load/write for all test models provided by a models API as proposed in #1872, as well as any widely used pre/post-processing utils. Could also try ASV — it has been adopted by other projects like numpy, shapely, and pywatershed.
Describe alternatives you've considered
We could just stick with pytest-benchmark and a bit of scripting instead of moving to ASV.
Additional context
This would help quantify performance improvements from the ongoing effort to use pandas for file IO
ASV seems unmaintained now, and some projects have begun to switch away from it. We could either stick with pytest-benchmark or move to something like Codspeed, with which the former would work out of the box. But in any case, probably good to set up a more complete benchmarking system in the near term so we can see the difference when we start reimplementing IO routines.