Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Run performance benchmarks
name: Benchmarks

on:
push:
branches: ["main"]
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
rust:
runs-on: ubuntu-24.04
strategy:
matrix:
toolchain:
- 1.85.0 # msrv
- stable
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Install apt packages
run: |
sudo apt update
sudo apt install -y --no-install-recommends libgdal-dev

- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2
with:
channel: ${{ matrix.toolchain }}
cache: false
cache-target: release
bins: cargo-codspeed

- name: Build the benchmark target(s)
run: cargo codspeed build

- name: Run the benchmarks
uses: CodSpeedHQ/action@bb005fe1c1eea036d3894f02c049cb6b154a1c27 # v4.3.3
with:
mode: instrumentation
run: cargo codspeed run
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ url = "2.5.7"
cuda = ["cudarc"]

[[bench]]
name = "read_cog"
name = "read_geotiff"
harness = false
10 changes: 10 additions & 0 deletions benches/read_geotiff.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use criterion::{Criterion, criterion_group, criterion_main};

fn criterion_benchmark(c: &mut Criterion) {
let mut group = c.benchmark_group("read_geotiff");

group.finish();
}

criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);