codeflash-agent/.codeflash/textualize/rich/bench/bench_module.sh
Kevin Turcios 3b59d97647 squash
2026-04-13 14:12:17 -05:00

13 lines
788 B
Bash

#!/usr/bin/env bash
set -euo pipefail
VENV_PYTHON="$HOME/rich/.venv/bin/python"
echo "=== Per-module import time ==="
hyperfine --warmup 3 --min-runs 20 --shell=none \
-n 'rich (top-level)' "$VENV_PYTHON -c 'import rich'" \
-n 'rich.console.Console' "$VENV_PYTHON -c 'from rich.console import Console'" \
-n 'rich.logging.RichHandler' "$VENV_PYTHON -c 'from rich.logging import RichHandler'" \
-n 'rich.traceback.Traceback' "$VENV_PYTHON -c 'from rich.traceback import Traceback'" \
-n 'rich.print_json' "$VENV_PYTHON -c 'from rich import print_json'" \
-n 'rich.syntax.Syntax' "$VENV_PYTHON -c 'from rich.syntax import Syntax'" \
-n 'rich.pretty' "$VENV_PYTHON -c 'import rich.pretty'" \
-n 'rich.markdown.Markdown' "$VENV_PYTHON -c 'from rich.markdown import Markdown'"