Given a continuous input, greprate
will display the rates at which
matches to a given regular expression occur.
This project is currently very alpha, and should be viewed as a proof of concept.
$ (while true; do echo hello $((RANDOM % 10 + 1)); sleep 0.1; done) | greprate 'hello (\d+)'
1 : 67.36/min (11.4%) ==========================================================......................
10 : 67.36/min (11.4%) ==========================================================......................
2 : 94.30/min (15.9%) ================================================================================
3 : 80.83/min (13.6%) =====================================================================...........
4 : 26.94/min ( 4.5%) =======================.........................................................
5 : 13.47/min ( 2.3%) ============....................................................................
6 : 94.30/min (15.9%) ================================================================================
7 : 40.41/min ( 6.8%) ===================================.............................................
8 : 26.94/min ( 4.5%) =======================.........................................................
9 : 80.83/min (13.6%) =====================================================================...........