# Baseline Metrics **Run**: 01-code-cleanup **Date**: 2026-03-30 ## Code Metrics | Metric | Value | |--------|-------| | Source LOC (pyx + pxd + py) | 1,714 | | Test LOC (e2e + mocks) | 1,238 | | Source files | 22 (.pyx: 10, .pxd: 9, .py: 3) | | Test files | 10 | | Dependencies (requirements.txt) | 11 packages | | Dead code items identified | 20 | ## Test Suite | Metric | Value | |--------|-------| | Total tests | 23 | | Passing | 23 | | Failing | 0 | | Skipped | 0 | | Execution time | 11.93s | ## Functionality Inventory | Endpoint | Method | Coverage | Status | |----------|--------|----------|--------| | /health | GET | Covered | Working | | /detect | POST | Covered | Working | | /detect/{media_id} | POST | Covered | Working | | /detect/stream | GET | Covered | Working | ## File Structure (pre-refactoring) All source code lives in the repository root — no `src/` separation: - Root: main.py, setup.py, 8x .pyx, 7x .pxd, classes.json - engines/: 3x .pyx, 4x .pxd, __init__.py, __init__.pxd - e2e/: tests, mocks, fixtures, config ## Dead Code Inventory | Category | Count | Files | |----------|-------|-------| | Unused methods | 4 | serialize() x2, from_msgpack(), stop() | | Unused fields | 3 | file_data, model_batch_size, annotation_name | | Unused constants | 5 | CONFIG_FILE, QUEUE_CONFIG_FILENAME, CDN_CONFIG, SMALL_SIZE_KB, QUEUE_MAXSIZE | | Orphaned declarations | 3 | COMMANDS_QUEUE, ANNOTATIONS_QUEUE, weather enum PXD | | Dead imports | 4 | msgpack x3, typing/numpy in pxd | | Empty files | 1 | engines/__init__.pxd |