vanilla
vanilla copied to clipboard
benchmarking, profiling
Hello again, Andy!
Just to call your attention to this, I put together a benchmarking network server in a couple of different greenlet I/O libraries, including vanilla: https://github.com/teepark/puffin/blob/master/bench_server.py (and the bench shell script).
You've inspired me to try and tighten up greenhouse's scheduler core, and in that "puffin" experiment I'm managing to (just) beat gevent on networking code with pure-python-to-epoll.
The bench_server.py server is intended to be as simple a networking test as possible, but still be usable against an http-based benchmarking tool (so for instance it goes straight to the socket and blindly reads until '\r\n\r\n', not wasting time doing anything but networking).
It can also activate cProfile during the bench run, but that's less illuminating than I'd hoped. Total time per call shows up as 0.000 for all functions in all libraries. It basically just comes down to python interpreter overhead, so the least python code wins.
Hope you find it helpful. --travis