BenchBox Examples
This section provides detailed documentation for all examples in the examples/ directory.
Overview
The BenchBox examples are organized into six categories to help you learn progressively and find the right pattern for your needs.
Example Categories
1. Getting Started Examples
Walkthroughs | Beginner-friendly | 5-10 minutes each
Zero to working benchmark in minutes. Includes local (DuckDB) and cloud (Databricks, BigQuery) examples with clear progression.
Start here if: You’re new to BenchBox
2. Feature Examples
9 examples | Intermediate | 10-15 minutes each
Learn specific BenchBox capabilities in isolation: test types, query subsetting, tuning, multi-platform execution, and more.
Start here if: You know the basics and want to learn specific features
3. Use Case Patterns
4 examples | Advanced | 20-30 minutes each
Real-world solutions for common problems: CI/CD testing, platform evaluation, incremental tuning, and cost optimization.
Start here if: You’re building production workflows
4. Notebook Examples
11 notebooks | All levels | Interactive
Interactive Jupyter notebooks for each platform plus analysis patterns. Perfect for exploration and presentation.
Start here if: You prefer interactive development
5. Configuration Templates
55 files | Reference | Copy-paste ready
Platform configurations (10 files) and benchmark tuning configs (45 files) for all supported platforms.
Start here if: You need platform setup or tuning references
6. Workflow Patterns
8 patterns | All levels | Production-ready
Complete, tested workflow patterns for common scenarios. Each pattern includes context, code, and usage guidance.
Start here if: You want proven patterns for your workflow
Quick Links
- Complete directory structure: Examples Directory Guide
- Examples repository location:
examples/in the BenchBox repository - Detailed navigation:
examples/INDEX.md - Pattern reference:
examples/PATTERNS.md
How to Use These Guides
Each guide in this section:
- Lists all examples in that category with descriptions
- Provides code snippets and usage examples
- Links to source files in the
examples/directory - Explains when to use each example
- Shows expected output where applicable
Running the Examples
All examples are in the examples/ directory of the BenchBox repository:
git clone https://github.com/BenchBox-dev/benchbox.gitcd benchbox/examples
uv add benchbox
cd getting_started/localpython duckdb_tpch_power.py
cd ../../featurespython query_subset.pyThe steps clone the repository if you haven’t already, install BenchBox, run a local example that needs no configuration, and run a feature example.
For cloud examples, see the Configuration Guide for platform setup instructions.
See Also
- Getting Started Guide - BenchBox fundamentals
- Configuration Guide - Platform configuration
- CLI Reference - Command-line interface
- API Reference - Python API