From 68447c3871223ab53bb4edd542242532d275bee3 Mon Sep 17 00:00:00 2001 From: juliet Date: Wed, 22 Jul 2026 09:47:26 -0700 Subject: [PATCH] osprey-stress: refresh measure/open-loop wording now that #236 merged (#438) Co-authored-by: Claude Opus 4.8 Co-authored-by: Cassidy James --- osprey_worker/src/osprey/worker/stress/cli.py | 17 +++++++++-------- .../src/osprey/worker/stress/consumer.py | 6 +++--- .../src/osprey/worker/stress/reporter.py | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/osprey_worker/src/osprey/worker/stress/cli.py b/osprey_worker/src/osprey/worker/stress/cli.py index 146f1c1..7e3e29c 100644 --- a/osprey_worker/src/osprey/worker/stress/cli.py +++ b/osprey_worker/src/osprey/worker/stress/cli.py @@ -12,9 +12,10 @@ to the input topic at rate R, consumes the resulting `ExecutionResult`s from the output topic, and reports drop rate + latency. Exits non-zero on threshold breach so it can be wired into CI as a gate. -The `measure` subcommand is reserved for when #236 (jetstream input stream -plugin) lands — it will let the same measurement layer run in open-loop mode -against any external input source. Today it prints a stub message. +The `measure` subcommand is a planned open-loop mode: it would run the same +measurement layer against events produced by an external source (such as the +JetStream input stream sample from #236) rather than synthetic ones. It is not +implemented yet, so today it prints a stub message; use `run` in the meantime. """ from __future__ import annotations @@ -282,7 +283,7 @@ def build_parser() -> argparse.ArgumentParser: measure = subparsers.add_parser( 'measure', - help='Measure-only mode (open-loop). Stub until #236 lands.', + help='Open-loop measurement mode; not yet implemented (use `run`).', ) _add_common_kafka_args(measure) _add_threshold_args(measure) @@ -428,10 +429,10 @@ def cmd_run(args: argparse.Namespace) -> int: def cmd_measure(args: argparse.Namespace) -> int: print( - '[osprey-stress] `measure` is not yet implemented. It will activate once ' - '#236 (jetstream input stream plugin) lands so this CLI can run the ' - 'measurement layer against externally-produced events. ' - 'Use `osprey-stress run` for synthetic closed-loop testing.', + '[osprey-stress] `measure` (open-loop mode) is not yet implemented. It is ' + 'intended to measure against externally-produced events, such as the ' + 'JetStream input stream sample (#236). ' + 'Use `osprey-stress run` for synthetic closed-loop testing in the meantime.', file=sys.stderr, ) return EXIT_INTERNAL_ERROR diff --git a/osprey_worker/src/osprey/worker/stress/consumer.py b/osprey_worker/src/osprey/worker/stress/consumer.py index 0fa636f..85e0c98 100644 --- a/osprey_worker/src/osprey/worker/stress/consumer.py +++ b/osprey_worker/src/osprey/worker/stress/consumer.py @@ -4,9 +4,9 @@ Subscribes to the `osprey.execution_results` Kafka topic and records the wall-clock receive time per `ActionId` so the reporter can pair every input event with its output and compute end-to-end latency. -Producer-agnostic: the same consumer works against synthetic load (#324), -jetstream-driven load (once #236 lands), or any other input source. The -optional `action_id_filter` decides whether we're in closed-loop matching mode +Producer-agnostic: the same consumer works against synthetic load (#324), an +external source such as the JetStream input stream, or any other input source. +The optional `action_id_filter` decides whether we're in closed-loop matching mode (only count IDs we know about) or open-loop throughput mode (count everything). """ diff --git a/osprey_worker/src/osprey/worker/stress/reporter.py b/osprey_worker/src/osprey/worker/stress/reporter.py index 9f6fe5e..05595af 100644 --- a/osprey_worker/src/osprey/worker/stress/reporter.py +++ b/osprey_worker/src/osprey/worker/stress/reporter.py @@ -8,7 +8,7 @@ The harness has two measurement modes: * Closed-loop (synthetic source): we know every action_id we sent and when we sent it, so we can compute exact drop rate and per-event latency. -* Open-loop (external source — e.g. jetstream once #236 lands): we don't have +* Open-loop (external source, e.g. the JetStream input stream): we don't have per-event produce timestamps, so latency is unavailable; we report aggregate throughput and drop rate via input/output counts. """ -- 2.51.2