Skip to content

Instantly share code, notes, and snippets.

View joeharris76's full-sized avatar

Joe Harris joeharris76

View GitHub Profile
@joeharris76
joeharris76 / detect_databricks_cpu_architecture.md
Created May 11, 2026 00:09
Check Databricks Serverless CPU architecture

Check Databricks Serverless CPU architecture and RAM

It can be insightful to know whether a Databricks Serverless SQL warehouse (or serverless notebook/job compute) is running on ARM (Graviton) or x86, and which generation. This also reports the memory available to the execution sandbox.

Here’s a Python UDF that detects all of this from /proc/cpuinfo and /proc/meminfo.

@joeharris76
joeharris76 / version_matrix_metrics.json
Created February 27, 2026 20:52
DuckDB Version Matrix Metrics (TPC-H, TPC-DS, ClickBench, SSB) — v1.0.0 through v1.5.0-dev
{
"coverage": {
"expected_cells": 24,
"missing_cells": [],
"present_cells": 24,
"repetitions": {
"clickbench": {
"1.0.0": 3,
"1.1.3": 3,
"1.2.2": 3,
@joeharris76
joeharris76 / analyze_results.py
Created February 27, 2026 20:52
DuckDB Version Matrix Result Analysis Script
#!/usr/bin/env python3
"""Analyze DuckDB multi-version BenchBox results for the version-performance draft.
This script expects the 72-run matrix produced by run_version_matrix.sh:
- Versions: 1.0.0, 1.1.3, 1.2.2, 1.3.2, 1.4.4, 1.5.0.dev311
- Benchmarks: tpch(sf10), tpcds(sf10), clickbench(sf1), ssb(sf10)
- Reps: 3 per (version, benchmark)
It computes median metrics per matrix cell and writes structured artifacts
(JSON + CSV) for table population in version-performance.md.
@joeharris76
joeharris76 / run_version_matrix.sh
Created February 27, 2026 20:52
BenchBox Test Matrix Runner — DuckDB v1.0.0 through v1.5.0-dev
#!/usr/bin/env bash
set -euo pipefail
# Run from repo root so all relative paths resolve correctly regardless of
# where the script is invoked from.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$(cd "${SCRIPT_DIR}/../../../.." && pwd)"
# ---------------------------------------------------------------------------
# Matrix configuration — edit these to change what gets benchmarked.
@joeharris76
joeharris76 / version_matrix_summary.csv
Created February 27, 2026 20:50
DuckDB Version Performance Matrix Summary (TPC-H, TPC-DS, ClickBench, SSB) — v1.0.0 through v1.5.0-dev
benchmark version version_label repetitions power_runtime_ms load_phase_ms tpc_metric_key tpc_metric queries_total queries_passed queries_failed queries_timeout
tpch 1.0.0 v1.0.0 3 15228.0 0.0 power_at_size 194230.9929058735 66 66 0 0
tpch 1.1.3 v1.1.3 3 10273.0 0.0 power_at_size 270753.7587300187 66 66 0 0
tpch 1.2.2 v1.2.2 3 10085.0 0.0 power_at_size 274287.2613729865 66 66 0 0
tpch 1.3.2 v1.3.2 3 9906.0 0.0 power_at_size 277920.4131863435 66 66 0 0
tpch 1.4.4 v1.4.4 3 9683.0 0.0 power_at_size 282439.53287570045 66 66 0 0
tpch 1.5.0.dev311 v1.5.0-dev 3 9142.0 0.0 power_at_size 295791.66797752207 66 66 0 0
tpcds 1.0.0 v1.0.0 3 440989.0 24610.0 power_at_size 385807.4739165746 309 309 0 0
tpcds 1.1.3 v1.1.3 3 40691.0 24170.0 power_at_size 594666.3712702205 309 309 0 0
tpcds 1.2.2 v1.2.2 3 79558.0 26099.0 power_at_size 500512.22059836955 309 309 0 0
@joeharris76
joeharris76 / tpch_sf1_datafusion_df_20260212_172419_mcp_b5db4a85.json
Created February 13, 2026 15:00
BenchBox TPC-H SF1 results: DataFusion SQL vs DataFrame (DataFusion 51.0.0)
{
"version": "2.1",
"run": {
"id": "mcp_b5db4a85",
"timestamp": "2026-02-12T17:24:19.361388",
"total_duration_ms": 6511,
"query_time_ms": 4718,
"iterations": 3,
"streams": 3
},
╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity
@joeharris76
joeharris76 / detect_snowflake_cpu_architecture.md
Created February 7, 2025 19:56
Check if Snowflake warehouse is using ARM (Graviton)

Check if Snowflake warehouse is using ARM (Graviton)

It can be insightful to know whether a specific Snowflake warehouse is running on ARM or x86 CPUs.

Here's a Python UDF that detects this.

CREATE OR REPLACE FUNCTION detect_cpu_architecture()
RETURNS STRING
LANGUAGE PYTHON
@joeharris76
joeharris76 / cobalt.json
Created August 26, 2024 13:34 — forked from pmarreck/cobalt.json
Cobalt theme (the original one from TextMate) for the Zed editor
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Cobalt",
"author": "Jacob Rus",
"theme.translator": "Peter Marreck",
"themes": [
{
"name": "Cobalt",
"appearance": "dark",
"style": {
@joeharris76
joeharris76 / Snowflake Warehouse Nodes.md
Last active December 6, 2024 16:43
Snowflake Warehouse Nodes