Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to print headers #69

Open
pveentjer opened this issue Aug 12, 2021 · 1 comment
Open

Option to print headers #69

pveentjer opened this issue Aug 12, 2021 · 1 comment

Comments

@pveentjer
Copy link

pveentjer commented Aug 12, 2021

When running a test for a long period, it becomes unclear what the columns mean:

  17s   71242   71242      0 2.7ms  1.8ms  1.3ms  1.1ms  1ms    918µs  897µs  
  18s   71191   71191      0 2.4ms  1.9ms  1.3ms  1.1ms  1ms    918µs  898µs  
  19s   71265   71265      0 2.4ms  1.7ms  1.2ms  1.1ms  1ms    918µs  897µs  
  20s   71153   71153      0 2.3ms  1.8ms  1.3ms  1.1ms  1ms    918µs  898µs  
  21s   70867   70867      0 2.3ms  1.8ms  1.3ms  1.1ms  1ms    918µs  902µs  
  22s   69379   69379      0 10ms   6.9ms  1.6ms  1.1ms  1ms    918µs  921µs  
  23s   69655   69655      0 8.9ms  5.9ms  1.6ms  1.1ms  1ms    918µs  918µs  
  24s   69595   69595      0 9.2ms  6.3ms  1.7ms  1.1ms  1ms    918µs  919µs  
  25s   69125   69125      0 10ms   6.5ms  1.9ms  1.1ms  1ms    918µs  925µs  
  26s   69779   69779      0 14ms   6.3ms  1.6ms  1.1ms  1ms    918µs  916µs  
  27s   70166   70166      0 9ms    5.7ms  1.4ms  1.1ms  1ms    918µs  911µs  

If e.g. every 10/20 seconds the header was printed, it will be easier to figure out what the meaning is of a column.

@nyh
Copy link
Contributor

nyh commented Aug 12, 2021

Good idea. doing this was a common tradition in Unix tools.

It shouldn't be about the amount of seconds, but about the lines of output. For example, vmstat 1 prints a line of output every second, and re-prints the headers ever 25 lines - where 25 is assumed to be a useful terminal-window height.

As far as I can tell, vmstat has this number "25" hard-coded. But an even better approach is to figure out the terminal height. For an application that doesn't need to deal with being resized, the easiest thing is just use use the LINES environment variable - which all modern shells set.

dkropachev added a commit to dkropachev/scylla-bench that referenced this issue Feb 28, 2022
Fix following things:
1. Get rid of 2 histograms per thread to reduce memory usage
2. Make latency printing non-blocking
3. Reorganize code
4. Get rid of histogram merging

fixes scylladb#80, scylladb#49, scylladb#73, scylladb#69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants