Skip to content

Instantly share code, notes, and snippets.

@phaustin
Created February 21, 2019 22:21
Show Gist options
  • Select an option

  • Save phaustin/e90a3a789a4e8b3708db0c7e87b4d365 to your computer and use it in GitHub Desktop.

Select an option

Save phaustin/e90a3a789a4e8b3708db0c7e87b4d365 to your computer and use it in GitHub Desktop.
profiling

Nathaniel J. Smith @njsmith Feb 20 20:58 @belm0 oh whoa this is exciting. You might be the first person to profile a real complete Trio app :-)

John Belmonte @belm0 Feb 20 20:59 great-- I'll continue logging the saga :)

Nathaniel J. Smith @njsmith Feb 20 21:01 I don't trust cProfile very much, it adds a ton of per-function overhead, and that distorts things vmprof is excellent, but annoyingly the standard way to do it involves uploading the data to a web app to visualize, which (a) sometimes makes companies grumpy, (b) the web app has been down a lot. but you can spin up the server in a docker container (git clone https://github.com/vmprof/vmprof-server then follow the instructions here), and then do python -m vmprof --web-url localhost:8000 --web

Nathaniel J. Smith @njsmith Feb 20 21:07 pyflame is also good (these are both low-overhead sampling profilers, so they don't give you exact counts of how many times each function was called, but they give you wayyy more reliable CPU information)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment