Questions tagged [snakeviz]
12 questions
8
votes
1 answer
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 cProfile module as given below.
import cProfile,…

Muhammad Abdullah
- 876
- 2
- 8
- 26
5
votes
1 answer
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 reading the request field.
@app.route('/scan',…

Dmitry Zuev
- 142
- 7
4
votes
1 answer
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 checked with cProfile, I saw that these functions…

Rithwik
- 1,128
- 1
- 9
- 28
2
votes
0 answers
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 my_deco(f, *args, **kwargs):
ret = f(*args,…

A.Vignon
- 365
- 1
- 10
1
vote
1 answer
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
*** Profile stats marshalled to file '/tmp/tmpc9sm6_a0'.…

Xronx
- 1,160
- 7
- 23
1
vote
0 answers
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 function/method in the call but instead I see 'wrapped'…

JSharm
- 1,117
- 12
- 11
0
votes
0 answers
'snakeviz' command not recognized despite successful installation in Python 3.8
I am using python 3.8 and have installed the snakeviz module.
I can (successfully) generate the profile of my program by running the command:
> python -m cProfile -o program.prof temp_profile.py
But then when I try to visualize the profile using…

Benjamin Gutman
- 11
- 3
0
votes
2 answers
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 it raises a FileNotFoundError?
import pandas as pd
x = pd.read_excel()

Ell
- 51
- 6
0
votes
0 answers
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 first few lines of it:
Ordered by: internal…

beginner_python
- 37
- 4
0
votes
1 answer
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 interactively in our web browser using…

Matthew Reid
- 332
- 2
- 9
0
votes
2 answers
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%2Fprofile_info-60.prof snakeviz: error: no web…
user5662689
0
votes
0 answers
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 that the biggest influencer in execution time is…

Pablo Santa Cruz
- 176,835
- 32
- 241
- 292