Profiling Flashcards

(5 cards)

1
Q

What Is Profiling?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the first step?

A

the first step is to decide whether the required profiling technique is going to be at the macro or micro level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is macro profiling?

A

The macro profiling is about profiling the entire program and generating statistical information while it is running.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is micro profiling?

A

Micro profiling is profiling a specific part of the program. Micro-profiling is generally ad-hoc and manual in nature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

simple profiling

A

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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly