Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(480057)

Side by Side Diff: tools/rd_collect.sh

Issue 1540: WIP fix for higher rd_collect.sh CPU utilization.
Patch Set: Created 1 year, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/rd_collect_aom.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 set -e 2 set -e
3 3
4 CODECS="<daala|av1|av1-rt|vp8|vp9|x264|x265|libjpeg|mozjpeg|theora|webp|bpg>" 4 CODECS="<daala|av1|av1-rt|vp8|vp9|x264|x265|libjpeg|mozjpeg|theora|webp|bpg>"
5 5
6 if [ $# == 0 ]; then 6 if [ $# == 0 ]; then
7 echo "usage: DAALA_ROOT=<build_dir> $0 $CODECS *.y4m" 7 echo "usage: DAALA_ROOT=<build_dir> $0 $CODECS *.y4m"
8 exit 1 8 exit 1
9 fi 9 fi
10 10
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 if [ -z "$CORES" ]; then 379 if [ -z "$CORES" ]; then
380 if [ "$(uname -s)" = "Darwin" ]; then 380 if [ "$(uname -s)" = "Darwin" ]; then
381 CORES=$(sysctl -n hw.ncpu) 381 CORES=$(sysctl -n hw.ncpu)
382 else 382 else
383 CORES=$(grep -i processor /proc/cpuinfo | wc -l) 383 CORES=$(grep -i processor /proc/cpuinfo | wc -l)
384 fi 384 fi
385 #echo "CORES not set, using $CORES" 385 #echo "CORES not set, using $CORES"
386 fi 386 fi
387 387
388 find -L "$@" -type f -name "*.y4m" -print0 | xargs -0 -n1 -P$CORES $RD_COLLECT_S UB 388 RANGE="20 32 43 55 63"
luc.trudeau 2017/06/02 21:05:07 How about making the RANGE configurable if [ -z $
389 for f in $(find -L "$@" -type f -name "*.y4m"); do for x in $RANGE; do printf '% s\0%s\0' "$f" "$x"; done; done | xargs -0 -n2 -P$CORES $RD_COLLECT_SUB
OLDNEW
« no previous file with comments | « no previous file | tools/rd_collect_aom.sh » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld