Created
July 6, 2018 14:57
-
-
Save luctrudeau/1e5773492e534ce0a61a464eba78bbf9 to your computer and use it in GitHub Desktop.
Load Test Script
This file contains hidden or 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
#!/bin/bash | |
JOBS=(1 2 4 8 16 32 64) | |
ENCODE_THREADS=(1 2 4) | |
NUM_CPU_THREADS=64 | |
for NUM_ENCODE_THREADS in ${ENCODE_THREADS[*]}; do | |
for NUM_JOBS in ${JOBS[*]}; do | |
STEP=$(($NUM_CPU_THREADS/$NUM_JOBS)) | |
echo "Jobs" $NUM_JOBS "Enc Threads" $NUM_ENCODE_THREADS "(Seconds)" | |
for (( i=0; i<5; i+=1 )); do | |
START_TIME=$SECONDS | |
for (( COUNTER=0; COUNTER<$NUM_CPU_THREADS; COUNTER+=$STEP )); do | |
./vpxenc --threads=$NUM_ENCODE_THREADS --good --cpu-used=2 --codec=vp9 --psnr -v -o test${COUNTER}.webm ~/Videos/objective-1-fast/ducks_take_off_1080p50_60f.y4m 2> cpu${COUNTER}.out & | |
pids[${COUNTER}]=$! | |
done | |
for pid in ${pids[*]}; do | |
wait $pid | |
done | |
ELAPSED_TIME=$(($SECONDS - $START_TIME)) | |
echo -n ${ELAPSED_TIME}" " | |
done | |
printf "\n" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment