-
Notifications
You must be signed in to change notification settings - Fork 63
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
network attack: support bandwidth limit #91
network attack: support bandwidth limit #91
Conversation
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
|
||
cmd.Flags().StringVarP(&options.Rate, "rate", "r", "", "the speed knob, allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second") | ||
cmd.Flags().Uint32VarP(&options.Limit, "limit", "l", 0, "the number of bytes that can be queued waiting for tokens to become available") | ||
cmd.Flags().Uint32VarP(&options.Buffer, "buffer", "b", 0, "the maximum amount of bytes that tokens can be available for instantaneously") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a little concern. Some of these parameters are required (like the rate
, buffer
and limit
). Should we give them a better default value (but I cannot tell a reasonable value), or validate the input?
The user may run chaosd
only with rate
, and the command will succeed and give back a uid. However, it fails in the chaos-daemon
(but the error doesn't return out, this bug has been fixed in the latest chaos-daemon
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I will add default values for them, and validate the value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, PTAL again
Signed-off-by: xiang <[email protected]>
Signed-off-by: xiang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
close issue #89