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 -e and -s/-m #40

Closed
servidge opened this issue Jul 12, 2019 · 5 comments
Closed

option -e and -s/-m #40

servidge opened this issue Jul 12, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@servidge
Copy link

servidge commented Jul 12, 2019

It seems the options does not work properly. please correct me if i am wrong.

  • If the option -e is used there is only the Usage output so the preferred exceed character doesn't work.
  • If the option -m is used the -s option seems to be ignored. The graph limit at start is the given -m input. From my understanding the -s should be the first limit for the graph. If this is exceeded the last limit is the -m limit and the -e character is used to visualise this exception.

The tested version is compiled from today's source. 1.4

PS: despite that a cool piece of software ;)

@tenox7
Copy link
Owner

tenox7 commented Jul 24, 2019

You are absolutely right about -e not being honored right now. It's a bug. It was missing in optstring. Fixed now.

You are also right about -s not being used when -m is specified. However this is by design. Think of flag -s is not a limit of any kind. It's an initial or minimal graph or scale height. Most commonly used when for measuring something that has a known scale like CPU usage in % (the top being 100%) or link bandwidth (the top being xxx MB/s). You use -s when you don't want an actual limit but you want graph to be scaled minimally at x value. You use -m when you want a completely fixed scale never to go lover or higher than the value of the flag. One can think that -m is inclusive of -s and therefore specifying -s has no effect. Let me know if I can word it better way in help/description/usage.

@tenox7
Copy link
Owner

tenox7 commented Jul 25, 2019

I have updated the usage regarding -s and -m to be less confusing:

  -s minimum/initial scale of the plot (can go above if data input has larger value)
  -m maximum value, if exceeded draws error line (see -e), plot scale is fixed

@tenox7 tenox7 closed this as completed in d6a5ec9 Jul 25, 2019
@tenox7
Copy link
Owner

tenox7 commented Jul 25, 2019

fixed in head:master

@tenox7 tenox7 added the bug Something isn't working label Jul 25, 2019
@servidge
Copy link
Author

Ok, i can confirm the fix.
And the -s or -m parameters are used either or and not both at the same time. If you use the -s the -e does not take effect. i can live with that.
thanks for the fix

@tenox7
Copy link
Owner

tenox7 commented Jul 30, 2019

if -m is used -s becomes redundant, also if -s (and not -m) then -e is never used, so... yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants