Profiling Flashcards
(5 cards)
What Is Profiling?
process of profiling concentrates on going over your application’s codebase and assessing or analyzing how long each function/line of code takes and how often it gets executed to understand how the code can be optimised.
What is the first step?
the first step is to decide whether the required profiling technique is going to be at the macro or micro level.
What is macro profiling?
The macro profiling is about profiling the entire program and generating statistical information while it is running.
What is micro profiling?
Micro profiling is profiling a specific part of the program. Micro-profiling is generally ad-hoc and manual in nature.
simple profiling
simplest form of profiling requires running the function and assessing how long it took to execute and get the results
import time start = time.time() get_all_companies_data() end = time.time() print(end - start)