Skip to content

Conversation

@dfries
Copy link

@dfries dfries commented Dec 10, 2018

Otherwise it doesn't display an average at all. It is better to
display it every loop because your eye can easily spot the average
based on the one that doesn't change as much.
Press return to reset the average, I find on one system killing and
restarting can vary a lot (memory layout of what pages were chosen?),
better to keep it running and reset the average when something else
changed on the system. Unfortunately setting stdin to non-blocking has the
side effect that stdout is also non-blocking and so control-s discards
the print messages until control-q is pressed.
This updates the man page with 0 is forever and return resets the
average.

{
char c[80];
++avg_count;
printf("AVG %d\t", avg_count);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not suppress this too, if -a was specified?

(sorry for the super slow responses)

Otherwise it doesn't display an average at all.  It is better to
display it every loop because your eye can easily spot the average
based on the one that doesn't change as much.
Press return to reset the average, I find on one system killing and
restarting can vary a lot, better to keep it running and reset the
average when something else changed on the system.
@dfries
Copy link
Author

dfries commented Jan 19, 2019

I wasn't aware of the option, fixed in commit 58234ac
if(nr_loops==0 && showavg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants