status-im / statusmonitor

Simple command line app for monitoring Status.im app peformance metrics running on mobile.
3 stars 4 forks source link

Increase timer resolution #3

Open divan opened 6 years ago

divan commented 6 years ago

Currently, the polling interval is set to 1 second. It's a default for the https://github.com/gizak/termui library, and it seems like there is no easy way to change it. Obvious way should be to change ui.AddTimer()'s parameters, but it doesn't work because the timer is instantiated in termui library and hardcoded for 1s.

Need to investigate how to allow custom timers. I'm particularly interested in resolutions in range 100ms - 5s.

Note: by simply changing ui.AddTimer()'s parameter to 100ms and changing termui's render.go with /timer/1s -> /timer/100ms works perfectly

jreyeshdez commented 6 years ago

Hi @divan , I am looking into this enhancement and wondering if this could be done by passing command line arguments when running it, if no arguments then take default 1 second, or also through config file ? What do you think?

divan commented 6 years ago

Hey, sure, there is already a command line flag for that, (-i for interval), it just doesn't work for now.