mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
- Removes Codespell from deps, docs, and `Makefile`s - Python version requirements in all `pyproject.toml` files now use the `~=` (compatible release) specifier - All dependency groups and main dependencies now use explicit lower and upper bounds, reducing potential for breaking changes
16 lines
434 B
Python
16 lines
434 B
Python
import pytest
|
|
from pytest_benchmark.fixture import BenchmarkFixture # type: ignore[import-untyped]
|
|
|
|
from langchain_exa import ExaSearchRetriever
|
|
|
|
|
|
@pytest.mark.benchmark
|
|
def test_exa_retriever_init_time(benchmark: BenchmarkFixture) -> None:
|
|
"""Test ExaSearchRetriever initialization time."""
|
|
|
|
def _init_exa_retriever() -> None:
|
|
for _ in range(10):
|
|
ExaSearchRetriever()
|
|
|
|
benchmark(_init_exa_retriever)
|