Skip to content

feat(experiments): use milliseconds for repetition_delay in prometheus_client #442

Description

@milindsrivastava1997

Background

PR #437 renamed repetition_delayrepetition_delay_ms in asap-planner-rs (issue #398). The experiment config generator (asap-tools/experiments/experiment_utils/config.py) now has to maintain two separate copies of query_groups: the original full_config (seconds, consumed by prometheus_client) and a patched controller_only_config (ms, consumed by the controller).

This split exists because prometheus_client uses repetition_delay natively in seconds — directly in time.sleep(query_group.repetition_delay) and in unix-epoch modulo arithmetic in main_prometheus_client.py.

Work

Migrate prometheus_client to use repetition_delay_ms:

  • asap-tools/queriers/prometheus-client/classes/config.py: rename field, update from_dict
  • asap-tools/queriers/prometheus-client/main_prometheus_client.py: update time.sleep() call (/ 1000), fix epoch modulo arithmetic (/ 1000), update any other usages
  • asap-tools/experiments/grafana_config.py: update field references
  • asap-tools/experiments/generate_workload.py: emit repetition_delay_ms instead of repetition_delay
  • asap-tools/experiments/experiment_utils/config.py: remove the dual-key transform block (lines 352–363) since both consumers will use ms directly

Benefit

Eliminates the dual-copy transform in config.py (introduced as a workaround in PR #437) and gives the full experiment stack a consistent ms convention.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions