跳到正文
cccskills
免费在 GitHub 公开

add-benchmarks

Design or extend DataFusion benchmarks using SQL where practical. Select representative workload variations, keep unrelated processing lightweight, and integrate runs with bench.sh so measurements reflect useful execution paths and remain practical to run.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Guidelines for designing or extending DataFusion benchmarks.

查看安装方法

适用场景

  • Add SQL benchmarks for DataFusion operators
  • Select representative input sizes and filter conditions
  • Reduce unrelated processing overhead in measurements
  • Integrate benchmark preparation and execution with bench.sh

包含的文件(1)

  • SKILL.md2.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Benchmark Design

Follow these guidelines when designing or adding a new benchmark.

Design principles

Use the highest-level interface

Use the highest-level interface possible, preferably SQL, while keeping the work around the operator being measured as cheap as possible. When benchmarking a function, exercise its evaluation path instead of benchmarking internal utility functions in isolation.

This makes benchmarks easier to maintain and helps assess how much an optimization matters to end-to-end runtime. It also helps avoid spending time optimizing code that accounts for only a small fraction of the total runtime.

Practical criteria for choosing SQL or Rust benchmarks: Try implementing the benchmark in SQL first. If a Rust microbenchmark still seems like a better fit, use Criterion.

Vary the key workload axes

First identify the key axes to vary. For example, for a join benchmark:

  • Input size on each side.
  • Join-filter selectivity.
  • ...

Then choose benchmark cases that exercise representative variations. Full combinatorial coverage is unnecessary; focus on typical workloads that reflect real use cases.

When adding benchmark queries, simply tag each query with the decision made for every axis. For example, for a join benchmark with input sizes/filter selectivity to tune:

-- Q1: Small left input, large right input; 0.1% of pairs match.
SELECT *
FROM generate_series(1, 100) AS l
JOIN generate_series(1, 100000) AS r
  ON (l.value + r.value) % 1000 = 0;

-- Q2: Medium inputs on both sides; no filter.
SELECT *
FROM generate_series(1, 1000) AS l
CROSS JOIN generate_series(1, 1000) AS r;

SQL benchmarks

For implementation details, see the SQL benchmark README.

  1. Keep other operators cheap.

    When a SQL benchmark targets a specific operator, keep the work done by other operators as lightweight as possible. For example, use a data source such as generate_series() instead of a Parquet scan so scan overhead does not dominate the measurement. See the nlj benchmark for examples.

  2. Integrate with the top-level benchmark script.

    Ensure the benchmark can be prepared and run through bench.sh:

    # Run from the benchmarks directory.
    
    # Generate any required dataset.
    ./bench.sh data new_bench
    
    # Run the benchmark.
    ./bench.sh run new_bench
    
  3. Keep query runtimes practical.

    Tune the workload so each query takes roughly a few seconds per execution. This helps reduce the relative impact of timing noise while keeping the suite practical to run.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit one datafusion-spark function against Apache Spark 4.2.0. Compare source code, accepted types, and edge cases, verify expected results with PySpark, then fix differences and record remaining gaps as issues and disabled tests.

中文简介正在准备中。当前显示英语简介。

  • Auditing a function for Spark compatibility
  • Checking NULL, overflow, and ANSI mode behavior
  • Finding missing SQL test coverage
apache/datafusion94982026年10月19日 更新

Guide changes and reviews in datafusion-ffi, which connects separately compiled libraries. Check binary compatibility, memory ownership, and method coverage, and choose unit and cross-library tests for new wrappers, trait extensions, or codec changes.

中文简介正在准备中。当前显示英语简介。

  • Add FFI wrappers for DataFusion traits
  • Check that default method overrides cross the FFI boundary
  • Review binary compatibility and memory ownership in pull requests
apache/datafusion94982026年10月19日 更新

pr_review

免费

Review Apache DataFusion pull requests using the project's review guide. Gather the proposed changes, discussion, and automated check results, or apply the same review criteria to your own changes before submitting a pull request.

中文简介正在准备中。当前显示英语简介。

  • Reviewing an Apache DataFusion pull request
  • Checking your changes before submitting a pull request
  • Reviewing changes alongside discussion and automated check results
apache/datafusion94982026年10月19日 更新

查看 apache 的全部技能

报告此技能的问题