Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run 3rd party bench suites on CI #1787

Merged
merged 3 commits into from
Apr 6, 2023
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
5 changes: 5 additions & 0 deletions crates/re_arrow_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ deadlock_detection = ["parking_lot/deadlock_detection"]
## Integration with `polars`, to efficiently use the datastore with dataframes.
polars = ["dep:polars-core", "dep:polars-ops"]

## When set, disables costly benchmark suites that measure the performance of third-party
## libraries.
## Commonly set implicitly by --all-features, e.g. on CI.
dont_bench_third_party = []


[dependencies]
# Rerun dependencies:
Expand Down
10 changes: 8 additions & 2 deletions crates/re_arrow_store/benches/arrow2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use arrow2::{
array::{Array, PrimitiveArray, StructArray, UnionArray},
compute::aggregate::estimated_bytes_size,
};
use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, Criterion};
use itertools::Itertools;
use re_log_types::{
component_types::{InstanceKey, Point2D, Rect2D},
Expand All @@ -21,7 +21,13 @@ use re_log_types::{
// ---

criterion_group!(benches, erased_clone, estimated_size_bytes);
criterion_main!(benches);

#[cfg(not(feature = "dont_bench_third_party"))]
criterion::criterion_main!(benches);

// Don't run these benchmarks on CI: they measure the performance of third-party libraries.
#[cfg(feature = "dont_bench_third_party")]
fn main() {}

// ---

Expand Down
10 changes: 8 additions & 2 deletions crates/re_arrow_store/benches/arrow2_convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

use arrow2::{array::PrimitiveArray, datatypes::PhysicalType, types::PrimitiveType};
use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, Criterion};
use re_log_types::{
component_types::InstanceKey, external::arrow2_convert::deserialize::TryIntoCollection,
Component as _, DataCell,
Expand All @@ -13,7 +13,13 @@ use re_log_types::{
// ---

criterion_group!(benches, serialize, deserialize);
criterion_main!(benches);

#[cfg(not(feature = "dont_bench_third_party"))]
criterion::criterion_main!(benches);

// Don't run these benchmarks on CI: they measure the performance of third-party libraries.
#[cfg(feature = "dont_bench_third_party")]
fn main() {}

// ---

Expand Down
12 changes: 10 additions & 2 deletions crates/re_arrow_store/benches/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, Criterion};

use smallvec::SmallVec;
use tinyvec::TinyVec;

// ---

criterion_group!(benches, sort, split, swap, swap_opt);
criterion_main!(benches);

#[cfg(not(feature = "dont_bench_third_party"))]
criterion::criterion_main!(benches);

// Don't run these benchmarks on CI: they measure the performance of third-party libraries.
#[cfg(feature = "dont_bench_third_party")]
fn main() {}

// ---

Expand Down