How can you get the call tree with Python profilers?

I just stumbled on this as well, and spent some time learning how to generate a call graph (the normal results of cProfile is not terribly informative). Future reference, here’s another way to generate a beautiful call-tree graphic with cProfile + gprof2dot + graphViz. ——————— Install GraphViz: http://www.graphviz.org/Download_macos.php easy_install gprof2dot Run profile on the code. … Read more

How to time the different stages of maven execution

This is the quickest possible way: export MAVEN_OPTS=”-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS \ -Dorg.slf4j.simpleLogger.showDateTime=true” mvn test Results in MAVEN_OPTS=”-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS -Dorg.slf4j.simpleLogger.showDateTime=true” mvn test 17:06:07,330 [INFO] Scanning for projects… 17:06:07,447 [INFO] 17:06:07,447 [INFO] ———————————————————————— 17:06:07,448 [INFO] Building bimble-server 0.0.1-SNAPSHOT 17:06:07,448 [INFO] ———————————————————————— 17:06:07,747 [INFO] 17:06:07,748 [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ bimble-server — If you then add that environment variable to your … Read more

How do I find out what parts of my code are inefficient in Python

How do I see what inside the function is making the code take so long (Should I even use cProfile?) Yes, you can use cProfile but the way you asked the question makes me wonder if line_profiler (third party module, you need to install it) wouldn’t be a better tool. I’m using the IPython/Jupyter bindings … Read more

Profiling tool for Clojure?

I found VisualVM (see here and here) to be very convenient. Its use with Clojure has been described about a year ago in this blog post; as far as I can see, it’s not outdated in any way. Note that the GUI from which one starts the VisualVM profiler has a prominent text area where … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)