It's a good idea to time portions of your code and have some metric you monitor. This way you can see trends and solve bottlenecks before someone notices (hopefully).
Timing functions is easy with decorators, but sometimes you want to time a portion of a function. For this you can use a
context manager.
No comments:
Post a Comment