Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120636155
get-winner-from-cdf
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 5, 19:47
Size
1 KB
Mime Type
text/x-shellscript
Expires
Mon, Jul 7, 19:47 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27196052
Attached To
R3704 elastic-yarn
get-winner-from-cdf
View Options
#!/bin/bash
YARN_PATH=/HDD-2TB/YARN
if [ $# -ne 1 ]
then
echo "Give param dir name"
exit
fi
DIR=$1
cd $DIR
echo $DIR
find | grep parameters | head -n 1 | xargs -I {} cat {} | sed 's/[ \t]\+/ /g' | cut -d' ' -f3- | column -t
cd ..
$YARN_PATH/scripts/summarize-cdf-absolute $DIR | grep TRACE
get_winner() {
PERCENTILE=$1
COL_IDX=$2
echo "Winner ${PERCENTILE}th:"
$YARN_PATH/scripts/summarize-cdf-absolute $DIR | awk '
BEGIN{a=0;b=0;c=0;d=0;e=0;f=0;}
/regular/ {a=$2;b=$3;c=$4;d=$5;e=$6;f=$7; print $0,"aaa",100,100,100,100,100,100}
!/regular/ && !/TRACE/ && !/SIMTYPE/ && !/-----/ {printf "%s %s %d %d %d %d %d %d\n",$0,"aaa",$2*100/a,$3*100/b,$4*100/c,$5*100/d,$6*100/e,$7*100/f}
' | awk -v col=$COL_IDX '
NR == 1 { winner = $1; min=$col; }
NR>1 && $col == min { winner = winner " " $1; }
NR>1 && $col > 0 && $col < min { winner = $1; min=$col; }
END { print "(" 100 - min "%) " winner }'
}
echo "-----------------------------------------------------------------"
get_winner 50 10
echo "-----------------------------------------------------------------"
get_winner 90 12
echo "-----------------------------------------------------------------"
get_winner 100 13
echo "-----------------------------------------------------------------"
Event Timeline
Log In to Comment