From 4684d286defc9757e10be3fc5102187f531bb98c Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 24 Feb 2017 00:30:08 -0800 Subject: [PATCH] stress.sh: add one pass encodes Change-Id: I38e6c988f17c56fbfacd95378b27ef8d77c75f90 --- test/stress.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/stress.sh b/test/stress.sh index 952382476..c5e420828 100755 --- a/test/stress.sh +++ b/test/stress.sh @@ -8,8 +8,10 @@ ## in the file PATENTS. All contributing project authors may ## be found in the AUTHORS file in the root of the source tree. ## -## This file performs a stress test. It runs 5 encodes and 30 decodes in -## parallel. +## This file performs a stress test. It runs (STRESS_ONEPASS_MAX_JOBS, +## default=5) one, (STRESS_TWOPASS_MAX_JOBS, default=5) two pass & +## (STRESS_RT_MAX_JOBS, default=5) encodes and (STRESS__DECODE_MAX_JOBS, +## default=30) decodes in parallel. . $(dirname $0)/tools_common.sh @@ -77,17 +79,28 @@ stress() { local readonly decode_count="$3" local pids="" local rt_max_jobs=${STRESS_RT_MAX_JOBS:-5} + local onepass_max_jobs=${STRESS_ONEPASS_MAX_JOBS:-5} local twopass_max_jobs=${STRESS_TWOPASS_MAX_JOBS:-5} # Enable job control, so we can run multiple processes. set -m + # Start $onepass_max_jobs encode jobs in parallel. + for i in $(seq ${onepass_max_jobs}); do + bitrate=$(($i * 20 + 300)) + eval "${VPX_TEST_PREFIX}" "${encoder}" "--codec=${codec} -w 1280 -h 720" \ + "${YUV}" "-t 4 --limit=150 --test-decode=fatal --passes=1" \ + "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.1pass.webm" \ + ${devnull} & + pids="${pids} $!" + done + # Start $twopass_max_jobs encode jobs in parallel. for i in $(seq ${twopass_max_jobs}); do bitrate=$(($i * 20 + 300)) eval "${VPX_TEST_PREFIX}" "${encoder}" "--codec=${codec} -w 1280 -h 720" \ - "${YUV}" "-t 4 --limit=150 --test-decode=fatal " \ - "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.webm" \ + "${YUV}" "-t 4 --limit=150 --test-decode=fatal --passes=2" \ + "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.2pass.webm" \ ${devnull} & pids="${pids} $!" done -- 2.40.0