{"id":27660,"library":"codeflash-benchmark","title":"Codeflash Benchmark","description":"Pytest plugin for automatic code performance benchmarking and optimization, integrated with codeflash.ai. Current version 0.3.0, regular updates.","status":"active","version":"0.3.0","language":"python","source_language":"en","source_url":"https://github.com/codeflash-ai/codeflash-benchmark","tags":["benchmarking","pytest","performance","optimization"],"install":[{"cmd":"pip install codeflash-benchmark","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"Codeflash-benchmark exposes a pytest plugin; no direct API import needed.","wrong":"import codeflash","symbol":"pytest_benchmark","correct":"import codeflash_benchmark"}],"quickstart":{"code":"# Add to conftest.py or pytest.ini\n# pytest_plugins = ['codeflash_benchmark']\n# Then run: pytest --benchmark-only\nimport os\nif os.environ.get('CODEFLASH_API_KEY', ''):\n    print('Benchmarking with codeflash.ai')","lang":"python","description":"Enable the plugin via pytest_plugins and run with --benchmark-only flag."},"warnings":[{"fix":"Set CODEFLASH_API_KEY in your environment.","message":"Ensure CODEFLASH_API_KEY environment variable is set for remote optimization. Without it, benchmarking only runs locally.","severity":"gotcha","affected_versions":"<0.3.0"},{"fix":"Use explicit --benchmark-flags instead.","message":"The auto-optimization feature may be deprecated in future versions; check docs for manual optimization.","severity":"deprecated","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with: pip install codeflash-benchmark","cause":"Wrong import or not installed.","error":"ModuleNotFoundError: No module named 'codeflash_benchmark'"},{"fix":"Add 'pytest_plugins = [\"codeflash_benchmark\"]' to conftest.py or pytest.ini","cause":"Plugin not registered.","error":"usage: pytest [options] ...\npytest: error: unrecognized arguments: --benchmark-only"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}