Closed The-Compiler closed 8 years ago
Actually you can run this on a package, you just need to compile Javascript first:
npm run build && npm run compress && python -m vprof m testscript.py
Huh? That'd still launch a single script rather than a package, which means imports like from mypackage.foo import bar
won't work.
There's __main__.py
file in vprof
module and that's why python -m vprof
works. Imports such as from vprof import profile_wrappers
also work.
Could you clarify this feature request in details?
Thanks!
I don't want to run vprof
as a package, I want to run it on a package.
In other words, you mention vprof cm testscript.py
in the readme. However, I have a package (with a __main__.py
and many modules) I want to run vprof
on, so I'd like to do something like vprof cm -m mypackage
.
Does that make sense? :smile:
I got it. Thanks!
Hi, I've added experimental support for profiling packages. I haven't updated README.md yet,
but vprof cmh my_package
should work now. my_package
can be installed package or path to package in filesystem.
Thank you! I have some trouble getting npm/browserify running on the Debian machine I'm on currently, but I'll try later on Archlinux.
So this only works on packages? What about running modules, like python's -m
?
It'd be nice if it was easily possible to run this on a package, similar to
python -m foo
.