Page MenuHomec4science

calc-saved-memory
No OneTemporary

File Metadata

Created
Tue, Feb 25, 13:57

calc-saved-memory

#!/bin/bash
if [ $# -ne 1 ]
then
echo "give dir"
exit
fi
cd $1
DIR=$1
for SIM in "greedy-none" "regular-none" "informed-hAgg" "informed-hInd" "informed-head" "informed-crt" "informed-fut" "informed-rnd"
do
for bla in 1
do
echo $SIM $SIM
MEAN_NR_INFORMED_ALLOCS=`for file in *-$SIM-simulation.log; do grep 'assignContainer' $file | grep -v normally | wc -l; done | ~/stats | grep mean | awk '{print $2}'`
echo $MEAN_NR_INFORMED_ALLOCS $MEAN_NR_INFORMED_ALLOCS
for file in *-$SIM-simulation.log
do
ASKED_FOR_TOTAL=`grep 'assignContainer' $file | grep -v normally | grep -o '[0-9]\+$' | ~/stats | grep sum | awk '{print $2}'`
AVAILABLE_TOTAL=`grep 'assignContainer' $file | grep -v normally | grep -o 'Available: [0-9]\+\.' | grep -o '[0-9]\+' | ~/stats | grep sum | awk '{print $2}'`
SAVED_TOTAL=`echo "$ASKED_FOR_TOTAL $AVAILABLE_TOTAL" | awk '{print $1-$2}'`
echo "saved total: $SAVED_TOTAL"
done
#| sort | uniq -c
done
#> ../an.$DIR.$SIM
done
#paste ../an.$DIR.* | column -t | awk '{print $2,$1,$3,$5,$7,$9,$11}' | column -t

Event Timeline