treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
247 stars 25 forks source link

Add logging of total time used, and time used for each main section, and for each tile step #224

Closed alfh closed 10 months ago

alfh commented 10 months ago

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

alfh commented 10 months ago

Seems like I had wronly rebased it, will make a new PR