Add logging of duration of various steps of the process, to be able to see where the focus for improvements should be, and to be able to detect any changes in performance from version to version, or from machine to machine, or from country to country.
Considerations and implementations
There are a couple of commits at the start of the history which are really general small fixups, I could have created a separate PR for them.
I have just added simple logging, and have not looked for any general "metrics" python library.
Include both CPU time and wall time most places, even though the CPU time might be less interesting, since it is mainly other processes that are being spawned.
I have not added an CLI option to choose whether you want the logging or not, I assume it is quite interesting for most people.
How to test
Run the unit tests with "python -m unittest -v" to see the logging.
Run the CLI to generate a tile or a country, and observe the logging of duration.
This PR…
Add logging of duration of various steps of the process, to be able to see where the focus for improvements should be, and to be able to detect any changes in performance from version to version, or from machine to machine, or from country to country.
Considerations and implementations
There are a couple of commits at the start of the history which are really general small fixups, I could have created a separate PR for them.
I have just added simple logging, and have not looked for any general "metrics" python library. Include both CPU time and wall time most places, even though the CPU time might be less interesting, since it is mainly other processes that are being spawned. I have not added an CLI option to choose whether you want the logging or not, I assume it is quite interesting for most people.
How to test
Run the unit tests with "python -m unittest -v" to see the logging. Run the CLI to generate a tile or a country, and observe the logging of duration.
Pull Request Checklist