#!/bin/bash

set -e

echo "Running base36 roundtrip benchmarks..."
echo "======================================="
echo

# Check if criterion is in dependencies
if ! grep -q "criterion" Cargo.toml; then
    echo "Error: criterion not found in Cargo.toml"
    exit 1
fi

# Run the benchmark
cargo bench --bench base36_roundtrip

echo
echo "Benchmark results are saved in target/criterion/"
echo "Open target/criterion/report/index.html to view detailed HTML report"