diff --git a/src/test/java/edu/illinois/library/cantaloupe/perf/processor/FfmpegProcessorPerformance.java b/src/test/java/edu/illinois/library/cantaloupe/perf/processor/FfmpegProcessorPerformance.java index be4a08235..3986434b3 100644 --- a/src/test/java/edu/illinois/library/cantaloupe/perf/processor/FfmpegProcessorPerformance.java +++ b/src/test/java/edu/illinois/library/cantaloupe/perf/processor/FfmpegProcessorPerformance.java @@ -18,6 +18,7 @@ import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; @@ -37,6 +38,9 @@ public class FfmpegProcessorPerformance { private FileProcessor processor; + + @Param({"10", "50", "100", "500", "1000", "5000"}) + private int threads; @Setup public void setUp() throws Exception { @@ -52,62 +56,74 @@ public void tearDown() { @Benchmark public void processWithAVI() throws Exception { - processor.setSourceFormat(Format.get("avi")); - processor.setSourceFile(TestUtil.getImage("avi")); - processor.process( - OperationList.builder().withOperations(new Encode(Format.get("png"))).build(), - Info.builder().withSize(640, 360).build(), - OutputStream.nullOutputStream()); + for (int i=0; i