This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git
The following commit(s) were added to refs/heads/main by this push:
new 6485c39 ai-benchmark: read the log again when camel_get_log answers
with no records
6485c39 is described below
commit 6485c397dad45af10838850615c479c3bb78ff81
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Oct 10 10:13:29 2026 +0200
ai-benchmark: read the log again when camel_get_log answers with no records
A running app always has log records, so an empty answer is a failed read:
one failed a reference
step (fail-well-circuit-breaker step 1) that passed on both reruns. Read up
to three times, a second
apart, and say so in the run output.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
---
ai-benchmark/agent_mcp_stepwise.py | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/ai-benchmark/agent_mcp_stepwise.py
b/ai-benchmark/agent_mcp_stepwise.py
index 3c794b5..22237ba 100755
--- a/ai-benchmark/agent_mcp_stepwise.py
+++ b/ai-benchmark/agent_mcp_stepwise.py
@@ -110,13 +110,23 @@ def jcall(mcp, name, args):
def log_lines(mcp, name, limit=40):
- data, raw = jcall(mcp, "camel_get_log", {"name": name, "limit": limit})
- if isinstance(data, dict):
- for k in ("lines", "records", "entries"):
- if k in data:
- return data[k]
- if isinstance(data, list):
- return data
+ # a running app always has log records, so an empty answer is a failed
read, not an empty log: retried, as one
+ # empty read failed a reference step that passed on both reruns (salref,
Oct 10, fail-well-circuit-breaker step 1)
+ for attempt in range(3):
+ data, raw = jcall(mcp, "camel_get_log", {"name": name, "limit": limit})
+ lines = []
+ if isinstance(data, dict):
+ for k in ("lines", "records", "entries"):
+ if k in data:
+ lines = data[k]
+ break
+ elif isinstance(data, list):
+ lines = data
+ if lines:
+ return lines
+ if attempt < 2:
+ print(f"camel_get_log {name}: no records, reading again
({str(raw)[:120]})", flush=True)
+ time.sleep(1)
return []