From 9a0859212de4d1304f9392fe910921227421c8c3 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 16 Aug 2014 21:25:52 +0100 Subject: cleanup --- benchmark/run.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 benchmark/run.sh (limited to 'benchmark/run.sh') diff --git a/benchmark/run.sh b/benchmark/run.sh new file mode 100755 index 0000000..c4bf31f --- /dev/null +++ b/benchmark/run.sh @@ -0,0 +1,41 @@ +#!/bin/zsh + + +REPEAT=10 +TMP_OVERALL=/tmp/.overall + + +echo +echo "JSON parsing benchmark" +echo "----------------------" +echo " REAPEAT=$REPEAT" +echo + +for prg in \ + test_cdec_json_parser \ + test_gason \ + test_JsonBox \ + test_jsoncpp \ + test_json-cpp \ + test_jsonxx \ + test_libjson \ + test_nosjob \ + test_picojson \ + test_rapidjson \ + test_sajson +do + echo "[$prg]" + sudo sync + sudo sh -c "echo 3 > /proc/sys/vm/drop_caches" + echo > $TMP_OVERALL + for file in `ls -S ../data/*.json`; do + echo "$file:\t$(./benchmark.rb $REPEAT ../src/$prg $file 2>/dev/null | tee -a $TMP_OVERALL | avg | round 2) s" + done + echo "---" + echo "overall:\t$(avg < $TMP_OVERALL | round 2)" + echo " memory:\t$(./memusg.sh ../src/$prg data/1020.json 2>/dev/null)" + echo +done + +rm $TMP_OVERALL + -- cgit v1.2.3