Linked Questions
267 questions linked to/from How do I profile a Python script?
14 votes
2 answers
23k views
python time measure for every function [duplicate]
I just completed writing my first program in python, i have written all my functions in a single module, i just executed it from command line by giving the input files as argument and it worked. But ...
0 votes
1 answer
18k views
How do I know why running my code is taking too long? [duplicate]
I understand that my code's complexity isn't the best, and I thought it might take 3 - 6 minutes running, but I gave it 15 minutes and it didn't stop. How do I know if it got stuck somewhere or it's ...
6 votes
1 answer
2k views
Python tool for performance profiling [duplicate]
Possible Duplicate: How can you profile a Python script? What visual tools do you know, something similar to JProfiler for Java, to analyze performance of Python applications?
0 votes
2 answers
2k views
How can I find out, where my program spends most of its time? [duplicate]
Given be a program that has many functions, how can I find out how much time spends in every functions? For example it is very simple to track the execution time of one funtion, 27 possible solutions ...
2 votes
0 answers
3k views
Memory Usage of Python application in PyCharm [duplicate]
I'm trying to investigate high RAM use during the use of my Python application. The image below shows the high memory usage. Is there an option when using PyCharm to view memory usage? I have 16GB of ...
0 votes
0 answers
2k views
How do you check the efficiency of a python program? [duplicate]
I want to check how efficient my code is (time taken to run, and lines of code). For example, how can I check whether this fibonacci code is efficient? def fibonacci(start=0, end=10): a = 0 b = 1 ...
4 votes
1 answer
507 views
On python with numpy/scipy len() cProfile result [duplicate]
Possible Duplicate: How can you profile a Python script? I have using cProfile to find out what method spent me most of the time on my python code, here is an output after sorting for "percall": ...
3 votes
0 answers
483 views
Python : How to know what time was spent on each line? [duplicate]
I am working on a code with relatively few iterations (like, less than 100) and the total time is still several minutes. This means complexity is of no help and I don't really know what operations ...
0 votes
2 answers
252 views
Tracking number of executions of methods and functions in Python package [duplicate]
Possible Duplicate: How can you profile a Python script? I'm developing an API with several packages collaborating together via various gui's and I'm slowly thinking about how I would be able to ...
0 votes
2 answers
234 views
Time it takes python to process a given function? [duplicate]
I've written a python script and it's conducting a lot of string comparisons with a number of functions. If I were to run the current process it would take a month to complete. I would like to make ...
0 votes
1 answer
230 views
Performance Profile in python [duplicate]
Hi I want to draw a performance profile directly from python, and the results of implementation are stored in lists, what can I do next? New to python, hope someone can help, thanks in advance.
0 votes
1 answer
172 views
How to obtain the cost time of each **def**? [duplicate]
I create a decorator to time the cost of every funcions : def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time(...
-1 votes
1 answer
101 views
Does anyone know how to put a stopwatch before and after training each model to evaluate which one is faster? [duplicate]
I have created loan risk prediction python machine learning model for Predict whether borrower will able to pay bank loan or not. My model is working perfectly fine with 78% accuracy. However my ...
1 vote
0 answers
58 views
Is there a way to not update pygame frames is nothing has happened? [duplicate]
I am designing a game in pygame at the moment and i was thinking how low my framerate was (an average of 7 fps). I investigated further and did convert_alpha() for all my images and I wondered if ...
2191 votes
42 answers
3.1m views
How do I measure elapsed time in Python?
I want to measure the time it took to execute a function. I couldn't get timeit to work: import timeit start = timeit.timeit() print("hello") end = timeit.timeit() print(end - start)