Comments (13)
I ran vprof -c cmh -s "evaluate.py -o 7496a0471ba8259926b36028b79b5a0e62ecf03c -d 510 -f 260 -s 25" and no results were presented in any way.
How long does your script run without profiling ? Can you run it just with -c c
option?
If I understand correctly there should appear new tabs in my browser but that didn't happen.
Yep. that's right.
I had to pass the hash without single quotation marks as vprof would put another pair around them. Is this intended?
Can you elaborate?
Thanks!
from vprof.
How long does your script run without profiling ? Can you run it just with -c c option?
Depending on the git repository it can go up to a few hours. Its an evaluation script for my thesis so I usually run it overnight. Just started it with only the c config for a small repo so it should be done in half an hour or so.
Can vprof open chromium or does it have to be open already?
Can you elaborate?
I always passed strings with ''
around them using argparse. just tried it without and it seems to work.
When I had 'hash'
instead of just hash
in the parameter list using vprof i got this:
error: pathspec ''7496a0471ba8259926b36028b79b5a0e62ecf03c'' did not match any file(s) known to git.
so there was an extra pair added. But now I think I just don't need them anyway
Thank you for the fast response :)
Edit: Oh and it didn't feel like profiling was slowing down the script big way but that could just be me not noticing it. Might time it later if you are interested.
from vprof.
Depending on the git repository it can go up to a few hours. Its an evaluation script for my thesis so I usually run it overnight. Just started it with only the c config for a small repo so it should be done in half an hour or so.
c
options has lowest overhead, m
and h
overhead is larger. Plus your script is run every time for every option. For now vprof
is not very suitable for "big picture" profiles.
Can vprof open chromium or does it have to be open already?
vprof
opens web browser automatically, but only after all data was collected.
I always passed strings with '' around them using argparse. just tried it without and it seems to work.
vprof
treats string in double quotes as single argument to be able to process scripts with arguments.
from vprof.
Ok now the new tab opens but the loading animation is the only thing I get.
Edit: Ok tried all three options alone and for the flame graph I just get one single chunk that says ~:0(<built-in method builtins.exec>)
For memory I get loading screen.
Heatmap seems to work as intended.
maybe I should add that the script is very memory hungry. 20+ GB are easily possible
from vprof.
Thanks!
Edit: Ok tried all three options alone and for the flame graph I just get one single chunk that says ~:0()
This is interesting. Can you make screenshot (if possible, of course)?
For memory I get loading screen.
maybe I should add that the script is very memory hungry. 20+ GB are easily possible
Seems that your script generates a lot of data 😄 As I've written above, handling such amounts of data in vprof
can be improved in future versions.
EDIT: Is your script Python 2 compatible? If yes, can you run it under Python 2? Thanks!
from vprof.
I also reduced the memory usage to a few GB but still only the heat map seems to work
how would I tell it to run with python2? looks like vprof uses the system default which is 3 for me I guess
from vprof.
This looks interesting.
how would I tell it to run with python2? looks like vprof uses the system default which is 3 for me I guess
If your script is Python 2 compatible then you can install vprof
with pip
for Python 2. Usually it's accessible under pip2
. Then you can run it as python -m vprof ...
from vprof.
well it looks like it doesn't like python 2 :/
from vprof.
Can you share some details about script you run (libraries you use and so on)? It also might be the reason you get such results.
from vprof.
https://gitlab.com/sims1253/bachelor_thesis/blob/master/evaluate.py
is the repository. Its hacky thesis code though.
In essence i get the git show for a repo via subprocess, for a number of commits, parse the diffs and rank files/lines by the number of fixes they received. See Bugspots for basic idea.
imports:
from __future__ import division
from contextlib import contextmanager
from scipy.integrate import trapz
import numpy as np
import linespots #this is the actual algorithm imported from the same directory
import re
import matplotlib.pyplot as plt
import os
from operator import itemgetter
from timeit import default_timer as timer
from collections import defaultdict
from vprof.
Thanks, I'll take a look.
from vprof.
Seems that importing numpy
, scipy
and matplotlib
breaks flame graph rendering in some cases in Python 3.
from vprof.
Looks like it's fixed in 0.34.
from vprof.
Related Issues (20)
- Is it possible to write to a file using `runner`? HOT 1
- ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
- module 'signal' has no attribute 'SIGPROF' HOT 2
- FileNotFoundError path to script has spaces HOT 1
- Configure remote server (host and port value) by setting environment variables
- [Help] How to test twisted code
- Fails with "IndexError: list index out of range" when running with -h (heatmap) HOT 1
- object of type 'int' has no len()
- Profiling command-line based scripts that change terminal settings results in a termios error
- How to use on Windows HOT 1
- Latest `highlight.js` node module breaks the build HOT 1
- Heatmap not always accumulate time spent on the right line
- Private on conda-forge?
- Add timeout option to vprofile? HOT 1
- How to profile long running application ? HOT 2
- heatmap not working in virtualenv python
- astronomic ram usage HOT 1
- Invalid handling of multi-word script argument
- Exception happened during processing of request from ('10.255.0.2', 55477) HOT 4
- Fix simple typo: regulal -> regular
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vprof.