hyperdashio / hyperdash-sdk-py

Official Python SDK for Hyperdash
https://hyperdash.io
199 stars 26 forks source link

Make CLI work with progress bars + Reduce amount of server messages sent #67

Closed richardartoul closed 7 years ago

richardartoul commented 7 years ago

This PR modifies the code hyperdash run command to read one character at a time off the pipes instead of one line at a time, and output them everytime a whitespace is encountered. This makes it so that progress bars can render in realtime-ish (it wont be as realtime as doing it without the hyperdash run command due to additional buffering).

It also decouples capturing IO locally and capturing IO for the server so that even in situations where many flushes are happening, the server doesn't receive more than 1 message per second.

Closes #63