temporalio / samples-server

MIT License
39 stars 32 forks source link

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

Closed taonic closed 8 months ago

taonic commented 8 months ago

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: https://github.com/temporalio/samples-server/blob/78fbef030e15a022e409fdb6c1e0032940e32f97/cloud/observability/promql-to-dd.py#L62

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?