litellm/tests/load_tests
Cursor Agent 0253a59ca4
test: add memory leak regression test with before/after RSS measurement
A pytest-based load test that sends thousands of requests through
litellm.acompletion() using the SleepModel CustomLLM, measuring RSS
memory at baseline, during load, and after cooldown with malloc_trim.

Asserts that memory growth stays under MAX_MEMORY_GROWTH_MB (default 150MB)
for 2000 requests with 4KB input / 1KB output payloads.

Skipped by default (RUN_MEMORY_TESTS=true to enable) since it's slow.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-13 23:01:21 +00:00
..
memory_leak_utils.py Add memory leak detection tests with CI integration (#18881) 2026-01-09 17:36:10 -08:00
sleep_mode.py test: add CustomLLM sleep model for memory profiling load tests 2026-03-13 23:00:25 +00:00
test_datadog_load_test.py test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
test_langsmith_load_test.py fix langsmith load tests 2024-09-11 21:19:03 -07:00
test_linear_memory_growth.py Add memory leak detection tests with CI integration (#18881) 2026-01-09 17:36:10 -08:00
test_memory_leak_regression.py test: add memory leak regression test with before/after RSS measurement 2026-03-13 23:01:21 +00:00
test_memory_usage.py (perf) Fix memory leak on /completions route (#8551) 2025-02-14 18:58:16 -08:00
test_otel_load_test.py test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
test_vertex_embeddings_load_test.py test: test_embedding_performance 2025-05-14 21:31:07 -07:00
test_vertex_load_tests.py vertex testing use pathrise-convert-1606954137718 2025-01-05 14:00:17 -08:00
vertex_key.json ci/cd update vertex acct 2025-01-05 13:43:32 -08:00