Initial commit: Divide-and-conquer sorting algorithms benchmark
- 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
This commit is contained in:
20
scripts/run_benchmarks.sh
Executable file
20
scripts/run_benchmarks.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/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."
|
||||
|
||||
Reference in New Issue
Block a user