feat: add Zenith strategy and move latency tracing
Build and Push Docker Container / build-and-push (push) Successful in 2m18s
Build and Push Docker Container / build-and-push (push) Successful in 2m18s
- Register Zenith 1.1 with balanced duel verdicts and forced-outcome overrides. - Prioritize permanent-trail space in Constrictor and health-aware hazard routes. - Deduct executor queue delays and return fallback directions on move timeouts. - Correlate response headers, replay timings, and sampled structured trace logs. - Move shared metrics publication off the response path without losing local counts. - Allow configurable tournament opponents and add a psql helper recipe. - Preserve empty latency values through compact replay encoding and migration. - Update Arena game links and use default assets for missing customizations. - Cover strategy, HTTP lifecycle, tracing, replay codecs, and dashboard behavior. - Validate with 260 passing Python tests, 4 skips, and 2 passing JavaScript tests.
This commit is contained in:
@@ -67,7 +67,8 @@ class MetricsCollector:
|
||||
self._metrics['games_autocreated'] += 1
|
||||
await self._auto_publish()
|
||||
|
||||
async def record_move(self, direction:str, elapsed_ms:float) -> None:
|
||||
def record_move_local(self, direction:str, elapsed_ms:float) -> None:
|
||||
"""Update counters without waiting for a shared metrics backend."""
|
||||
self._metrics['total_moves'] += 1
|
||||
self._metrics['move_response_time_ms_total'] += elapsed_ms
|
||||
self._metrics['move_response_time_ms_max'] = max(
|
||||
@@ -80,6 +81,12 @@ class MetricsCollector:
|
||||
# else:
|
||||
# move_counts['unknown'] += 1
|
||||
# self._metrics['last_move_unix'] = int(time.time())
|
||||
|
||||
async def record_move(self, direction:str, elapsed_ms:float) -> None:
|
||||
self.record_move_local(direction, elapsed_ms)
|
||||
await self._auto_publish()
|
||||
|
||||
async def publish_move_metrics(self) -> None:
|
||||
await self._auto_publish()
|
||||
|
||||
async def record_game_end(self, game_state:dict) -> None:
|
||||
|
||||
Reference in New Issue
Block a user