There are several ideas, this issue summarizes them and encourages discussion:
- online profiling (or profile streaming)
- query runtime information.
python -m vmprof.stat -p <pid> prints if profiling is enabled, how many bytes have been saved, ...
- network statistics (like statsd, profiles TCP and UDP timer and counters)