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

(promql-to-dd-go) add new flag to control sleep duration between runs #81

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

taonic
Copy link
Collaborator

@taonic taonic commented Jan 22, 2024

What was changed

Previous, the sleep duration between each data pull/push and the query window was using the same setting/flag.

This PR introduces a new flag to control sleep duration separately and default to 60s. This is also aligned with the Python implementation:

Output (new default 60 seconds interval):

2024/01/22 20:03:37 Submitted total of 2100 series
2024/01/22 20:03:37 Awaits next tick (interval: 60 seconds)
2024/01/22 20:03:48 Querying Prometheus
2024/01/22 20:03:48 Found 1 histogram metrics: [temporal_cloud_v0_service_latency_bucket]

Checklist

  1. Closes

  2. How was this tested:
    Manual (see above)

  3. Any docs updates needed?

@@ -29,7 +30,7 @@ const (

func (w *Worker) Run() {
interrupt := interruptCh()
ticker := time.NewTicker(w.QueryInterval)
ticker := time.NewTicker(w.SleepDuration)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this doing a 20s sleep between [1m] queries? I think what we want is a 60s sleep

Copy link
Collaborator Author

@taonic taonic Jan 24, 2024

Choose a reason for hiding this comment

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

@TimSimmons Yeps, that makes sense. The default value was borrowed from Python for consistency. Do you think we should make a change there too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose it might just be constantly overwriting the data, which is maybe ok?

Previous, the sleep duration between each data pull/push and the query window was using the same setting/flag.

This PR introduces a new flag to control sleep duration separately and
default to 20s.
@taonic taonic force-pushed the taonic/control_sleep_duration_separately branch from 78fbef0 to f172d77 Compare January 24, 2024 02:27
@taonic taonic merged commit 81e2210 into main Jan 24, 2024
6 checks passed
@taonic taonic deleted the taonic/control_sleep_duration_separately branch January 24, 2024 10:41
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