Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix latency data generation.

  • Loading branch information...
commit a5575de02642a4dd06e1c9c7d88c2acfe408de1f 1 parent 148b1c4
ms705 authored
Showing with 19 additions and 12 deletions.
  1. +18 −11 all_lat.sh
  2. +1 −1  run.py
29 all_lat.sh
View
@@ -5,16 +5,15 @@ COUNT=10000
LAT_TESTS="pipe_lat tcp_lat unix_lat mempipe_lat tcp_nodelay_lat"
TESTS="${LAT_TESTS}"
-MAX_COREID=$2
-echo "cores: ${MAX_COREID}"
+NUM_CORES=$2
ODIR=$1
rm -rf ${ODIR}
mkdir -p ${ODIR}
for SIZE in ${SIZES}; do
-for c1 in $(jot ${MAX_COREID}); do
- for c2 in $(jot ${MAX_COREID}); do
+for c1 in $(jot ${NUM_CORES} 0); do
+ for c2 in $(jot ${NUM_CORES} 0); do
echo ${c1} to ${c2}
for t in ${TESTS}; do
d="${ODIR}/${SIZE}/${c1}-${c2}-${t}"
@@ -25,14 +24,22 @@ for c1 in $(jot ${MAX_COREID}); do
count=${COUNT}
fi
./${t} -t -s ${SIZE} -c ${count} -a ${c1} -b ${c2} -o ${d}
-
- # post-processing
- ofile=${ODIR}/${t}.csv
- d="${ODIR}/${SIZE}/${c1}-${c2}-${t}/01-${t}-headline.log"
- speed=`tail -1 ${d} | awk '{print $4}' | sed -e 's/s//g'`
- echo -n "${speed} " >> ${ofile}
- rm ${ODIR}/${SIZE}/${c1}-${c2}-${t}/01-${t}-raw_tsc.log
done
done
done
+
+# post-processing
+for t in ${TESTS}; do
+ofile=${ODIR}/${t}.csv
+for c1 in $(jot ${NUM_CORES} 0); do
+ for c2 in $(jot ${NUM_CORES} 0); do
+ d="${ODIR}/${SIZE}/${c1}-${c2}-${t}/01-${t}-headline.log"
+ speed=`tail -1 ${d} | awk '{print $4}' | sed -e 's/s//g'`
+ echo -n "${speed} " >> ${ofile}
+# rm ${ODIR}/${SIZE}/${c1}-${c2}-${t}/01-${t}-raw_tsc.log
+ done
+ echo "" >> ${ofile}
+done
+done
+
done
2  run.py
View
@@ -217,7 +217,7 @@ def parse_list(s):
try:
print >>sys.stderr, "Running latency tests... (over %d CPUs)" % n_cpus
- argv = ["./all_lat.sh", resultdir + "/lat", str(n_cpus - 1)]
+ argv = ["./all_lat.sh", resultdir + "/lat", str(n_cpus)]
print argv
subprocess.check_call(argv)
except:
Please sign in to comment.
Something went wrong with that request. Please try again.