12 questions
1
vote
0
answers
143
views
Is there a way to filter out .pstats based on a directory?
I am trying to profile the nerfstudio implementation of the method nerfacto. I used cprofile while the running the scripts and then used the .pstats file generated by Cprofile to visualize the results ...
0
votes
2
answers
186
views
Raising FileNotFoundError when running script through SnakeViz
When I run my script from the IDE I don't get a problem. But when I run it using python -m cProfile <script_file_name> it raises a FileNotFoundError?
import pandas as pd
x = pd.read_excel(<...
2
votes
0
answers
479
views
using cProfile to profile a code with decorators have strange results
So i'm using cProfile and snakeviz to profil my code. My code has decorator which seems to make the cProfile results not very correct :
my code :
import time
import decorator
@decorator.decorator
def ...
0
votes
0
answers
960
views
How to interpret python cProfile output
I am running cProfile on my python script in order to see where i can improve performance and using snakeviz to visualize. The results are pretty vague however; how do I interpret them? Here are the ...
1
vote
1
answer
3k
views
How to see what is slowing your Python script down using snakeviz and cProfile
So you want to know why your Python script is running slow?
There is an easy way to do this using cProfile and pstats, which count the number of calls to each function. We can visualize the results ...
3
votes
2
answers
8k
views
Can't run snakeviz. What might be the problem here?
When I ran $ snakeviz code_profile.prof from CLI :
snakeviz web server started on 127.0.0.1:8080; enter Ctrl-C to exit http://127.0.0.1:8080/snakeviz/%2Fhome%2Fatmadeep%2FProjects%2FtrafficAI-master%...
4
votes
1
answer
2k
views
Is `built-in method numpy.core._multiarray_umath.implement_array_function` a performance bottleneck?
I'm using numpy v1.18.2 in some simulations, and using inbuilt functions such as np.unique, np.diff and np.interp. I'm using these functions on standard objects, i.e lists or numpy arrays.
When I ...
1
vote
1
answer
1k
views
Jupyter snakeviz extension. Generated file location
I've installed snakeviz into venv. Now I'm able to load extension into jupyter notebook via %load_ext snakeviz.
When I run it as magic in the beginning of the cell: %%snakeviz -t it prints
*** ...
5
votes
1
answer
680
views
Flask request.form.get too slow?
I am using Flask for my Web Api service.
Finding that my services sometimes (1/100 requests) respond really slow (seconds), I started debugging, which showed me that sometimes the service hangs on ...
1
vote
0
answers
196
views
How can I profile a python script with many decorated methods?
I'm using snakeviz/cProfile to view the profile data of a slow running python script.
However a lot of the longer running methods are wrapped with decorators and so I don't see the name of the ...
9
votes
1
answer
14k
views
How to save output of cProfile.Profile() to a *.prof file in Python Script
Hi I know the usage of command line method to profile a python script as given below.
python -m cProfile -o program.prof my_program.py
However I'm profiling specific piece of code in Python using ...
0
votes
0
answers
66
views
Python's cProfiler: method 'pop' of 'list' objects
I am trying to profile a python script I have. I run it like this:
$ python -m cProfile -o out.profile script.py
It runs well, I get a file called out.profile with profiling information, but I see ...