forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make mp4 parsing faster & lower memory overhead (rerun-io#7860)
- Loading branch information
Showing
12 changed files
with
177 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,18 +75,30 @@ jobs: | |
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
|
||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.25.0 | ||
# Only has the deps for round-trips. Not all examples. | ||
environments: wheel-test-min | ||
|
||
- name: Download test assets | ||
run: pixi run -e wheel-test-min python ./tests/assets/download_test_assets.py | ||
|
||
- name: Add SHORT_SHA env property with commit short sha | ||
run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-7`" >> $GITHUB_ENV | ||
|
||
- name: Run benchmark | ||
# Use bash shell so we get pipefail behavior with tee | ||
# Running under `pixi` so we get `nasm` | ||
run: | | ||
cargo bench \ | ||
pixi run -e wheel-test-min \ | ||
cargo bench \ | ||
--all-features \ | ||
-p re_entity_db \ | ||
-p re_log_encoding \ | ||
-p re_query \ | ||
-p re_tuid \ | ||
-p re_video \ | ||
-- --output-format=bencher | tee /tmp/${{ env.SHORT_SHA }} | ||
- name: "Set up Cloud SDK" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![allow(clippy::unwrap_used)] // acceptable in benchmarks | ||
|
||
use std::path::Path; | ||
|
||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
|
||
fn video_load(c: &mut Criterion) { | ||
let video_path = Path::new(env!("CARGO_MANIFEST_DIR")) | ||
.ancestors() | ||
.nth(3) | ||
.unwrap() | ||
.join("tests/assets/video/Big_Buck_Bunny_1080_10s_av1.mp4"); | ||
let video = std::fs::read(video_path).unwrap(); | ||
c.bench_function("video_load", |b| { | ||
b.iter_batched( | ||
|| {}, | ||
|()| re_video::VideoData::load_from_bytes(&video, "video/mp4"), | ||
criterion::BatchSize::LargeInput, | ||
); | ||
}); | ||
} | ||
|
||
criterion_group!(benches, video_load); | ||
criterion_main!(benches); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.