Command line interface for accessing the Open Web Index shards and slices.
owi-cli docs source testing_and_benchmarks.md
2.1 kB · 90 lines
Markdown

Testing and Benchmarks #

This document provides an overview of the OWILIX test suite and benchmark results.

Test Package Structure #

.. automodule:: tests.owilix.core
   :members:
   :noindex:

Database Executor Tests #

.. automodule:: tests.owilix.core.db
   :members:
   :noindex:

Fsspec Filesystem Tests #

.. automodule:: tests.owilix.core.fsspec
   :members:
   :noindex:

Repository Tests #

.. automodule:: tests.owilix.core.repository
   :members:
   :noindex:

Manager Tests #

.. automodule:: tests.owilix.core.manager
   :members:
   :noindex:

Quick Start #

# Run all unit tests (fast, no network)
uv run pytest tests/owilix/core/ -m "not integration" -v

# Run integration tests (requires LEXIS auth)
uv run pytest tests/owilix/core/ -m integration -v -s

# Run the remote search CLI/UI checks
uv run pytest tests/owilix/cli/test_remote_search_cli.py tests/owilix/core/tasks/test_search.py -q

# Run targeted network smoke checks used in release prep
uv run pytest tests/owilix/cli/test_smoke.py -q -m integration -k "remote_doctor or remote_ls_latest or remote_search"

# Run specific benchmark
uv run python tests/owilix/core/db/benchmark_comprehensive.py

Benchmark Summary #

Async Executor Performance #

Query Type Sync Async Improvement
COUNT(*) 25.0s 13.5s +46%
SELECT 23.6s 13.2s +44%
GROUP BY 24.9s 13.4s +46%
WHERE filter 26.6s 13.4s +50%
Average +46%

HTTP Connection Pooling #

Method Time (20 ops) vs Baseline
requests (no Session) 3.95s baseline
requests.Session 1.52s 2.6x faster
httpx sync 1.46s 2.7x faster
httpx async 0.38s 10x faster

Key Findings #

  • Use COUNT(*) - COUNT(id) is ~13% slower
  • prefetch=2 is optimal for sync executor
  • max_concurrent=10 is optimal for async
  • Async mode best for batch processing, not interactive use