-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[telemetrygen] Add continuous mode #40225
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
[telemetrygen] Add continuous mode #40225
Conversation
Please add a changelog - how about we change the logic, and if no |
Moving to draft while you address feedback and CI. Please mark ready for review when done. |
Added a changelog as well. Thank you for the heads up. The default logic is to send a single signal and then exit, which we use pretty often, but we would want to have this run continuously for health checks. So by default (no flag set) |
74a9845
to
eb59e0e
Compare
Thanks for explaining - ok in that case the additional flag makes sense. |
What about doing |
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 like the idea of using a duration value to avoid having to check one more flag, but i don't feel strongly about this
10d4db3
to
d2b4c86
Compare
I like the idea of an |
|
ebba9c7
to
eef1bf4
Compare
Agree, can't argue with this 😅 . Removed the |
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.
Would love this option!
} | ||
|
||
// DurationWithInf is a custom type that can handle both regular durations and "inf" value | ||
type DurationWithInf time.Duration |
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.
Unfortunately, placing this here will break programmatic usage of telemetrygen since it's an internal package. I'd be inclined to put this in pkg/types
or a similarly named package in order to keep Duration as something which can be set by either the CLI or an external package.
@atoulme's original idea of setting to continuous if no duration is set made the most sense to me as it's consistent with our rate
configuration behavior
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.
Moved the type out of internal
and update the defaults to run continuously, with a rate of 1
signal.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Removing stale - @araiu it's been 2 weeks, would you like to try and continue the work here? |
Forgot to state the obvious but I didn't find the time in these two weeks to work on this 😅 |
1d580a5
to
b60e6de
Compare
No worries. Glad I got some time to look more into it |
Add continuous mode to
telemetrygen
cmd.This can be achieved by setting a the
--duration
to a very large value, but--continuous
is explicit.