Skip to content

Commit

Permalink
Move test asset to git lfs
Browse files Browse the repository at this point in the history
  • Loading branch information
dholroyd committed Feb 19, 2024
1 parent 6f227c5 commit d573ffc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testsrc.ts filter=lfs diff=lfs merge=lfs -text
2 changes: 0 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:

- uses: bencherdev/bencher@main

- name: Download test mpegts asset
run: wget --quiet -c "http://www.badgers-in-foil.co.uk/4d0660bd-5755-4917-9592-2e3d85736592.ts"
- run: sudo apt-get install valgrind
- run: cargo install --version 0.10.2 iai-callgrind-runner
- run: |
Expand Down
4 changes: 2 additions & 2 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ fn mpeg2ts_reader(c: &mut Criterion) {
// code to consume
vec![0; 188]
} else {
let mut f = File::open("resources/testsrc.ts")
.expect("Test file missing. To create, run: mkdir -p resources && ffmpeg -f lavfi -i testsrc=duration=20:size=640x360:rate=30,noise=alls=20:allf=t+u -f lavfi -i sine=duration=20:frequency=1:beep_factor=480:sample_rate=48000 -c:v libx264 -b:v 20M -map 0:v -c:a aac -b:a 128k -map 1:a -vf format=yuv420p -f mpegts resources/testsrc.ts");
let mut f = File::open("testsrc.ts")
.expect("Test file missing. To create, run: mkdir -p resources && ffmpeg -f lavfi -i testsrc=duration=20:size=640x360:rate=30,noise=alls=20:allf=t+u -f lavfi -i sine=duration=20:frequency=1:beep_factor=480:sample_rate=48000 -c:v libx264 -b:v 20M -map 0:v -c:a aac -b:a 128k -map 1:a -vf format=yuv420p -f mpegts testsrc.ts");
let l = f.metadata().unwrap().len() as usize;
let size = l.min(188 * 200_000);
let mut buf = vec![0; size];
Expand Down
3 changes: 2 additions & 1 deletion benches/ci_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ impl<Ctx> pes::ElementaryStreamConsumer<Ctx> for NullElementaryStreamConsumer {

#[library_benchmark]
fn reader() {
let mut f = File::open("4d0660bd-5755-4917-9592-2e3d85736592.ts").expect("Test file missing");
let mut f = File::open("testsrc.ts")
.expect("Test file missing. To create, run: mkdir -p resources && ffmpeg -f lavfi -i testsrc=duration=20:size=640x360:rate=30,noise=alls=20:allf=t+u -f lavfi -i sine=duration=20:frequency=1:beep_factor=480:sample_rate=48000 -c:v libx264 -b:v 20M -map 0:v -c:a aac -b:a 128k -map 1:a -vf format=yuv420p -f mpegts testsrc.ts");
let l = f.metadata().unwrap().len() as usize;
let size = l.min(188 * 200_000);
let mut buf = vec![0; size];
Expand Down
3 changes: 3 additions & 0 deletions testsrc.ts
Git LFS file not shown

0 comments on commit d573ffc

Please sign in to comment.