Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120943590
get-decision-times
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
Mon, Jul 7, 23:29
Size
1 KB
Mime Type
text/x-shellscript
Expires
Wed, Jul 9, 23:29 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27239712
Attached To
R3704 elastic-yarn
get-decision-times
View Options
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Give dir"
exit
fi
cd $1
for file in `ls | grep simulation.log$`
do
FXX="$file.decision"
grep took $file | grep -o '[0-9]* ms$' | grep -o '[0-9]\+' > $FXX
~/cdf-gen.py $FXX 0 > $FXX.cdf
SUM=`cat $FXX.cdf | awk '{print $2}' | ~/stats | grep sum | awk '{print $2}'`
NRLINES=`cat $FXX.cdf | wc -l`
P50=$(($NRLINES*50/100))
P90=$(($NRLINES*90/100))
P95=$(($NRLINES*95/100))
P96=$(($NRLINES*96/100))
P97=$(($NRLINES*97/100))
P98=$(($NRLINES*98/100))
P99=$(($NRLINES*99/100))
M50=`sed "${P50}q;d" $FXX.cdf | awk '{print $2}'`
M90=`sed "${P90}q;d" $FXX.cdf | awk '{print $2}'`
M95=`sed "${P95}q;d" $FXX.cdf | awk '{print $2}'`
M96=`sed "${P96}q;d" $FXX.cdf | awk '{print $2}'`
M97=`sed "${P97}q;d" $FXX.cdf | awk '{print $2}'`
M98=`sed "${P98}q;d" $FXX.cdf | awk '{print $2}'`
M99=`sed "${P99}q;d" $FXX.cdf | awk '{print $2}'`
MAX=`sed "${NRLINES}q;d" $FXX.cdf | awk '{print $2}'`
echo $file $SUM $M50 $M90 $M95 $M96 $M97 $M98 $M99 $MAX | awk '{printf "%40s sum :%20s med: %8s 90th: %8s 95th: %10s %10s %10s %10s %10s max: %15s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9,$10}'
done
Event Timeline
Log In to Comment