Comments (10)
First, if your program takes only a few milliseconds to run, that may be too fast for vmprof to collect any data at all. Second, vmprof collects only data about pure Python code, but numpy is implemented almost entirely in C, which is why you won't see anything useful with your example.
Btw does anyone know of a Python profiler that can look into the C stack?
from vmprof-python.
Released version doesn't support Python 3.5.1. See #60
from vmprof-python.
@methane Thanks!
from vmprof-python.
@fijal Could you please release the fix?
from vmprof-python.
I've release the fix
from vmprof-python.
To be precise: I've release the mentioned pull request, but not the fix for this issue, will reopen that one
from vmprof-python.
I have tried the same script now with 0.4.3 on mac os x 10.12.3. It revealed an issue on mac: a signal is delivered after vmprof.disable() is called (which terminated the program with SIGPROF). The signal handler is now set to SIG_IGN (signal ignore) which passes. I'm trying to find a better solution though.
Here is the native profile:
http://vmprof.com/#/567aa150-5927-4867-b22d-dbb67ac824ac
from vmprof-python.
Okay I seem encountered this issue, tired with python 3.5.1 or 3.6.1 both not working.
vmprof version 0.4.3
python -m vmprof -o output.log xx.py
(xx.py print stuff and output.log generated)
vmprofshow output.log
Traceback (most recent call last):
File "/Users/fuyangliu/Tradeshift/supplier-matching/python3.6-env/bin/vmprofshow", line 11, in <module>
sys.exit(main())
File "/Users/fuyangliu/Tradeshift/supplier-matching/python3.6-env/lib/python3.6/site-packages/vmprof/show.py", line 160, in main
pp.show(args.profile)
File "/Users/fuyangliu/Tradeshift/supplier-matching/python3.6-env/lib/python3.6/site-packages/vmprof/show.py", line 64, in show
tree = stats.get_tree()
File "/Users/fuyangliu/Tradeshift/supplier-matching/python3.6-env/lib/python3.6/site-packages/vmprof/stats.py", line 106, in get_tree
top = self.get_top(self.profiles)
File "/Users/fuyangliu/Tradeshift/supplier-matching/python3.6-env/lib/python3.6/site-packages/vmprof/stats.py", line 97, in get_top
raise EmptyProfileFile()
vmprof.stats.EmptyProfileFile
Is this a related problem?
Stuff in xx.py
def f_a():
for x in range(100):
print(x)
if __name__=='__main__':
f_a()
from vmprof-python.
it seems that 100 iterations is not enough for a single signal to occur. I get the same issue, try to run at least 1000 iterations...
from vmprof-python.
It now displays the following (the warning is only displayed if the profiling took less than 1 second):
WARNING: The profiling completed in less than 1 seconds. Please run your programs longer!
No stack trace has been recorded (profile is empty)! Did your program not run long enough?
from vmprof-python.
Related Issues (20)
- TestNative tests are failing HOT 1
- Streaming output
- Vmprof: "Undefined" in flamegraph, and "No stack trace has been recorded (profile is empty)!" HOT 1
- vmprofshow doesn't work
- Broken on MacOS HOT 16
- Got "Segmentation fault: 11 " when profiling a PyPy + Flask + Gevent app HOT 1
- "resolving addr" extremely slow HOT 1
- Installation issues Ubuntu HOT 6
- SIGALRM not always delivered to main thread in practice HOT 1
- Recorded profile end time is too late, making it hard to timestamp each sample HOT 1
- "No module named _vmprof" error on Windows 10 x64 + pypy-jit latest nigthly HOT 3
- Embedded Python seems not possible to resolve "native" functions HOT 5
- Please release new version to pypi (python 3.10 issue) HOT 19
- Move CI to cibuildwheel HOT 3
- How to quickly pinpoint blocking (ie non-async) calls slowing down the event loop?
- can not build on mac with arm64 arch. HOT 3
- Support building without embedded libbacktrace HOT 3
- Add wheel for Python3.7+ HOT 10
- Default to stdlib timezone objects instead of pytz
- Python 3.11 Windows 11 22H2 Pip install error HOT 3
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 vmprof-python.