https://github.com/thomasjungblut/rate
rate is a small tool to measure how many lines per second come through a unix pipeline.
https://github.com/thomasjungblut/rate
Last synced: 3 months ago
JSON representation
rate is a small tool to measure how many lines per second come through a unix pipeline.
- Host: GitHub
- URL: https://github.com/thomasjungblut/rate
- Owner: thomasjungblut
- License: apache-2.0
- Created: 2019-10-01T14:16:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-19T10:36:56.000Z (over 5 years ago)
- Last Synced: 2024-10-29T23:30:52.184Z (8 months ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rate
Rate gives you the current rate (per second) of incoming lines over a pipe.
You can test with the checked-in bash script:
```
$ ./test_rate.sh | ./rate
Rate: 10.00/s
```There are two additional options to visualize the rate, plot and table.
Plot looks like this:
```
$ ./test_rate.sh | ./rate --plot37.4¦
¦ ••
¦ •• ••
¦ ••• •
¦ ••• ••
¦ •• •
R ••••••••••••••••••• •
a •••••• ••
t ••••••• •
e ••••••• ••
/ •••••• •
s ••••
¦ ••••
¦ ••••
¦ •••
¦ ••••
¦ •••
¦••
0 ¦---------------------------------Relative time in seconds--------------------------------------
-35.0 0.0```
whereas table is a simple output of the past measurements:
```
$ ./test_rate.sh | ./rate --tableTime Count Rate/s
2019-10-01 20:50:55 +0200 CEST 24 4.000000
2019-10-01 20:51:00 +0200 CEST 60 11.200000
2019-10-01 20:51:05 +0200 CEST 85 16.200000
2019-10-01 20:51:10 +0200 CEST 86 17.200000```
## Installation
With golang 1.12 (or higher) installed, just run
> go install github.com/thomasjungblut/rate
Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:
> export PATH=$PATH:$GOPATH/bin