moznion / Persec
A command to measure the throughput of per-sec which is on the basis of number of lines from STDIN
Programming Languages
go
31211 projects - #10 most used programming language
persec
A command to measure the throughput of per-sec which is on the basis of number of lines from STDIN.
Usage
Basic
$ some_command | persec [Options]
Bar chart mode
$ some_command | persec --chart 100 [Other Options]
Description
This tool measures the throughput of per-sec which is on the basis of number of lines from STDIN (e.g. piping with tail -f something
).
Measuring mechanism is really simple;
- Count the number of lines while fixed interval (default 60sec).
- Counted number divide by fixed interval, then it is enable to evaluate throughput of per-sec.
Default, this command also output lines which is from STDIN (like a tee
command).
If you don't want to do that, please append --notee
option.
Options
- --delta=60: Interval as seconds to measure the throughput
- --help=false: Show helps
- --limit=0: It measures the throughput until number which is specified by this option. If this option is zero or negative, it measures unlimited.
- --notee=false: Don't tee if this option is true
- --out="": Output destination of throughput. If this option is unspecified, results will be written into STDOUT.
- --pattern="": A regexp pattern to filter the line. Filtering means this command measures throughput by matched lines only. If this option is unspecified, it doesn't filter.
- --timestamp=false: Prepend timestamp
- --chart=-1: Show throughput as a bar chart. This option receives int value as a maximum value of a chart. Default value of -1 means disable the chart mode. If 0 value is set, it will sample 5 time to determine the value of 100%.
- --color="reset": Colorize output. You can use colors which are supported by github.com/mgutz/ansi
How to install
go get
By $ go get github.com/moznion/persec
From GitHub Releases
Access to https://github.com/moznion/persec/releases and get an archive which is suitable your architecture.
Author
moznion ([email protected])
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].