python Programming Glossary: cprofile
How can I profile a SQLAlchemy powered application? http://stackoverflow.com/questions/1171166/how-can-i-profile-a-sqlalchemy-powered-application on specifics. For that you need to use profiling such as cProfile or hotshot. Here is a decorator I use import cProfile as profiler.. as cProfile or hotshot. Here is a decorator I use import cProfile as profiler import gc pstats time def profile fn def wrapper..
Using cProfile results with KCacheGrind http://stackoverflow.com/questions/1896032/using-cprofile-results-with-kcachegrind cProfile results with KCacheGrind I'm using cProfile to profile my Python.. cProfile results with KCacheGrind I'm using cProfile to profile my Python program. Based upon this talk I was under.. that KCacheGrind could parse and display the output from cProfile. However when I go to import the file KCacheGrind just displays..
Improving pure Python prime sieve by recurrence formula http://stackoverflow.com/questions/3285443/improving-pure-python-prime-sieve-by-recurrence-formula becomes faster than this special slicing technique. import cProfile def rwh_primes1 n # http stackoverflow.com questions 2068372.. 1 n 2 if sieve i numprimes 1000000 print 'Profiling' cProfile.Profile.bias 4e 6 for test in rwh_primes1 primes cProfile.run.. cProfile.Profile.bias 4e 6 for test in rwh_primes1 primes cProfile.run test numprimes Profiling not so much difference between..
How can I speed up fetching pages with urllib2 in python? http://stackoverflow.com/questions/3490173/how-can-i-speed-up-fetching-pages-with-urllib2-in-python bluedevilbooks.com search DEPT MATH CLASS 103 SEC 01 I ran cProfile on it and as I assumed urlopen takes up a lot of time. Is there..
How can I profile python code line-by-line? http://stackoverflow.com/questions/3927628/how-can-i-profile-python-code-line-by-line can I profile python code line by line I've been using cProfile to profile my code and it's been working great. I also use gprof2dot.py.. visualize the results makes it a little clearer . However cProfile and most other python profilers I've seen so far seem to only.. 102 0.5s function #12 called from main.py 12 1.5s cProfile does show how much of the total time transfers to the parent..
How can you profile a Python script? http://stackoverflow.com/questions/582336/how-can-you-profile-a-python-script improve this question Python includes a profiler called cProfile. It not only gives the total running time but also times each.. within your code or from the interpreter like this import cProfile cProfile.run 'foo ' Even more usefully you can invoke the cProfile.. code or from the interpreter like this import cProfile cProfile.run 'foo ' Even more usefully you can invoke the cProfile when..
How can I profile a multithread program in Python? http://stackoverflow.com/questions/653419/how-can-i-profile-a-multithread-program-in-python and I'd like to find out where it's spending its time. cProfile only seems to profile the main thread. Is there any way of profiling..
|