mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-08-26 17:31:37 +00:00
navi-offroute: enable INFO logging for per-stage timing (#35)
PR #34 added per-stage Auto timing logs (single-mode probing took..., hybrid candidate gathering..., hybrid probing took...) at logger.info level, but navi-offroute has no logging config, so Python's last-resort handler dropped everything below WARNING and the lines never reached stderr/journal. This one-line logging.basicConfig(level=logging.INFO) in app.py opens the gate so those lines surface in journald, letting us localize the 6-7s baseline Auto latency on in-town routes. No other changes. Co-authored-by: Matt <mj@k7zvx.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
913cc46f2a
commit
bcb0fd02d1
1 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
Gunicorn entry:
|
||||
gunicorn 'services.navi_offroute.app:create_app()' --bind 127.0.0.1:8428 --workers 2
|
||||
"""
|
||||
import logging
|
||||
import time
|
||||
|
||||
from flask import Flask
|
||||
|
|
@ -14,6 +15,11 @@ from .mvum import MVUMSpatialIndex
|
|||
from .mvum_transitions import load_trailheads
|
||||
from .mvum_parking import load_parking_index
|
||||
|
||||
# Emit INFO+ so PR #34 per-stage Auto timing logs (single-mode probing took...,
|
||||
# hybrid candidate gathering..., hybrid probing took...) reach stderr/journal;
|
||||
# navi-offroute had no logging config, so the last-resort handler dropped INFO.
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
# Process-wide singleton: build the MVUM spatial index once per process (per gunicorn
|
||||
# worker in prod; once across create_app() calls in tests), not once per app instance.
|
||||
_MVUM_INDEX = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue