- Implement Merge Sort and Quick Sort algorithms with instrumentation - Add Quick Sort pivot strategies: first, last, median_of_three, random - Create dataset generators for 5 dataset types (sorted, reverse, random, nearly_sorted, duplicates_heavy) - Build comprehensive benchmarking CLI with metrics collection - Add performance measurement (time, memory, comparisons, swaps) - Configure logging with rotating file handlers - Generate plots for time and memory vs size - Include comprehensive test suite with pytest - Add full documentation in README.md
21 lines
445 B
Bash
Executable File
21 lines
445 B
Bash
Executable File
#!/bin/bash
|
|
# Run benchmarks script
|
|
|
|
set -e
|
|
|
|
echo "Running sorting algorithm benchmarks..."
|
|
|
|
python -m src.bench.benchmark \
|
|
--algorithms merge,quick \
|
|
--datasets sorted,reverse,random,nearly_sorted,duplicates_heavy \
|
|
--sizes 1000,5000,10000,50000 \
|
|
--runs 5 \
|
|
--seed 42 \
|
|
--instrument \
|
|
--outdir results \
|
|
--log-level INFO \
|
|
--make-plots
|
|
|
|
echo "Benchmarks completed. Check results/ and plots/ directories."
|
|
|