diff --git a/README b/README
index 610ac12..58e914c 100644
--- a/README
+++ b/README
@@ -1 +1,21 @@
-Look in the "tpc" directory for source code; or see https://github.com/eishay/jvm-serializers/wiki for current results.
+(RuedigerMoeller =>)
+
+My current results:
+
+https://github.com/RuedigerMoeller/fast-serialization/wiki/TestPage
+
+My modifications:
+
+* The original project actually used the MINIMUM runtime for each benchmark thereby completely excluding GC related effects.
+I changed it to measure the average results of all runs (excluding warmup)
+
+* I start a new VM for each benchmark run instead of running all in a single VM
+
+* I limit test runs by time not by number of iterations
+
+* I somewhat categorized serializers (full graph, generic, manually adoption, JSON/Binary, crossplatform ..). A lot of
+comparing apples and oranges is going on there ..
+
+* beautified charts
+
+
diff --git a/tpc/README b/tpc/README
index 600ac2d..bfc17a0 100644
--- a/tpc/README
+++ b/tpc/README
@@ -1,16 +1,37 @@
Requirements:
- GNU Make 3.81+
-- JDK 1.5+
+- JDK 1.7+
+
+for windows install cygwin with make+bash features
To compile:
- make
+ make
+ (if you run in trouble its usually because of CRLF dirt) E.g. scalac did not run because it was CRLF
-To run:
- ./run -help
+To run
-To run and generate charts with all serializers: (For official results, add -trials=500)
- ./run -chart -include=`cat serializers.txt | tr "\\n" ","` data/media.1.cks
+ bash run-bench.sh
+
+Parameters of the default run are hardcoded in run-bench.sh
+To update results of subset of serializers
-To generate bindings for schema files, see top of "Makefile" for
-instructions on what to put into "Config.mk".
+ bash run-bench.sh serializer1,serializer2,..
+
+How this works:
+
+ the project was somewhat messy, i probably contributed to that .. but its easier to manage now.
+ I removed the config files to avoid problems when serializers rename or are un/commented. Additionally
+ each benchmark runs in a separate VM.
+
+ 1) the run-bench.sh uses class BenchmarkExporter.java to get a ',' separated list of all serializers to run.
+ All benchmarks registered in the BenchMarkRunner.java class a run be default.
+ 2) after each bench finished, the mk-stats.sh script aggregates the results found in ./results/tmp to ./results.txt
+ the the class StatsCruncher.java creates a Textile style report.
+ To modify the report output, directly edit the StatsCruncher.java . You are welcome to enhance this using
+ some templating/configuration files.
+ You can copy the report.textile directly to github wiki in textile-mode.
+ 3) You can run the mk-stats.sh script again without having to re-run the benchmarks if you want to add
+ custom query charts.
+ 4) to filter out certain libraries, do not uncomment them in BenchMarkRunner.java (except they fail), better
+ edit StatsCruncher.java to exclude them.
\ No newline at end of file
diff --git a/tpc/attic/README_old b/tpc/attic/README_old
new file mode 100644
index 0000000..af4a8f1
--- /dev/null
+++ b/tpc/attic/README_old
@@ -0,0 +1,16 @@
+Requirements:
+- GNU Make 3.81+
+- JDK 1.7+
+
+To compile:
+ make
+
+To run:
+ ./run -help
+
+To run and generate charts with all serializers: (For official results, add -trials=500)
+ ./run -chart -include=`cat serializers.txt | tr "\\n" ","` data/media.1.cks
+
+
+To generate bindings for schema files, see top of "Makefile" for
+instructions on what to put into "Config.mk".
diff --git a/tpc/run b/tpc/attic/run
old mode 100755
new mode 100644
similarity index 100%
rename from tpc/run
rename to tpc/attic/run
diff --git a/tpc/run-stream b/tpc/attic/run-stream
old mode 100755
new mode 100644
similarity index 100%
rename from tpc/run-stream
rename to tpc/attic/run-stream
diff --git a/tpc/run-wiki b/tpc/attic/run-wiki
similarity index 100%
rename from tpc/run-wiki
rename to tpc/attic/run-wiki
diff --git a/tpc/serializers.txt b/tpc/attic/serializers.txt
similarity index 100%
rename from tpc/serializers.txt
rename to tpc/attic/serializers.txt
diff --git a/tpc/data/media.1.cks-result.txt b/tpc/data/media.1.cks-result.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/tpc/data/media.1.cks-result.txt
@@ -0,0 +1 @@
+
diff --git a/tpc/lib/fst-1.40-onejar.jar b/tpc/lib/fst-1.40-onejar.jar
deleted file mode 100644
index fbbeb0a..0000000
Binary files a/tpc/lib/fst-1.40-onejar.jar and /dev/null differ
diff --git a/tpc/lib/fst-1.42.jar b/tpc/lib/fst-1.42.jar
new file mode 100644
index 0000000..141e884
Binary files /dev/null and b/tpc/lib/fst-1.42.jar differ
diff --git a/tpc/mk-stats.sh b/tpc/mk-stats.sh
new file mode 100644
index 0000000..b44407e
--- /dev/null
+++ b/tpc/mk-stats.sh
@@ -0,0 +1,21 @@
+#! /usr/bin/env bash
+
+echo "" > stats.txt
+
+FILES=./results/tmp/*-result.txt
+for f in $FILES
+do
+ awk '/./{line=$0} END{print line}' $f >> stats.txt
+done
+
+cpgen=$(cat build/gen-cp)
+cplib=$(cat build/lib-cp)
+sep=':'
+# cygwin
+case "`uname`" in
+ CYGWIN*) sep=';' ;;
+esac
+
+cp=./build/bytecode/main$sep$cpgen$sep$cplib
+
+java -cp $cp serializers.StatsCruncher
diff --git a/tpc/result.txt b/tpc/result.txt
deleted file mode 100644
index 699b9d1..0000000
--- a/tpc/result.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-java version "1.7.0_51"
-Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
-Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
-
-SIMPLE/GENERIC:
Serializes any POJO tree without class specific optimization. Serialized classes are known in advance. No cycle detection/shared object detection is done.
-
-Checking correctness...
-[done]
-Pre-warmup... java-built-in hessian kryo fast-serialization jboss-serialization jboss-marshalling-river protostuff msgpack-databind json/jackson/databind json/jackson/db-afterburner json/protostuff-runtime json/google-gson/databind json/svenson-databind json/flexjson/databind json/fastjson/databind smile/jackson/databind smile/jackson/db-afterburner bson/jackson/databind xml/xstream+c xml/jackson/databind-aalto
-[done]
-
-pre. create ser deser total size +dfl
-java-built-in 63 5838 30208 36046 889 514
-hessian 63 3881 6176 10057 501 313
-kryo 63 655 838 1493 212 132
-fast-serialization 63 704 864 1568 252 166
-jboss-serialization 63 6466 6643 13110 932 582
-jboss-marshalling-river 63 4656 23892 28548 694 400
-protostuff 82 495 732 1227 239 150
-msgpack-databind 62 830 1370 2200 233 146
-json/jackson/databind 62 1895 2600 4496 485 261
-json/jackson/db-afterburner 63 1513 1988 3501 485 261
-json/protostuff-runtime 63 1532 2138 3670 469 243
-json/google-gson/databind 63 5633 4844 10477 486 259
-json/svenson-databind 63 5270 10358 15628 495 272
-json/flexjson/databind 63 19445 25394 44838 503 273
-json/fastjson/databind 63 1316 1149 2465 486 262
-smile/jackson/databind 63 1768 1891 3659 338 241
-smile/jackson/db-afterburner 64 1448 1492 2940 352 252
-bson/jackson/databind 64 5376 6812 12188 506 286
-xml/xstream+c 64 6476 13505 19981 487 244
-xml/jackson/databind-aalto 63 3001 5516 8517 683 286
-
-
-
-
-
-
-
-
-
-DEFAULT:
Serializes any object trees, cycle detection enabled. Nothing is known in advance about the classes to serialize. Only serializers supporting full object graph restauration are included.
-
-Checking correctness...
-[done]
-Pre-warmup... java-built-in-serializer hessian kryo-serializer fast-serialization-shared jboss-serialization
-[done]
-
-pre. create ser deser total size +dfl
-java-built-in-serializer 64 5723 29259 34982 889 514
-hessian 64 3611 6169 9780 501 313
-kryo-serializer 64 1711 1499 3210 311 198
-fast-serialization-shared 64 1621 1592 3212 341 212
-jboss-serialization 64 6442 6339 12781 932 582
-
-
-
-
-
-
-
-
-
-SIMPLE/SPECIFC: Serializes only specific classes using code generation or other special knowledge about the class.
-
-Checking correctness...
-[done]
-Pre-warmup... kryo-opt wobly wobly-compact protobuf protostuff protobuf/protostuff thrift thrift-compact avro json/json-lib-databind json/jsonij-jpath
-[done]
-
-pre. create ser deser total size +dfl
-kryo-opt 64 658 864 1522 209 129
-wobly 43 886 536 1422 251 151
-wobly-compact 43 903 569 1471 225 139
-protobuf 130 1225 701 1926 239 149
-protostuff 82 488 678 1166 239 150
-protobuf/protostuff 83 598 692 1290 239 149
-thrift 126 1796 795 2591 349 197
-thrift-compact 126 1555 963 2518 240 148
-avro 89 1616 1415 3031 221 133
-json/json-lib-databind 63 26330 103150 129479 485 263
-json/jsonij-jpath 63 38015 12325 50339 478 259
-
-
-
-
-
-
-
-
-
-MANUAL:
Serializes only specific classes using hand written serialization code.
-
-Checking correctness...
-[done]
-Pre-warmup... java-manual kryo-manual protostuff-manual avro-generic json/jackson/manual json/protostuff-manual json/google-gson/manual json/json.simple/manual json/json-smart/manual/tree json/org.json/manual/tree json/argo-manual/tree smile/jackson/manual bson/mongodb xml/woodstox-manual xml/aalto-manual xml/xstream+c-woodstox xml/xstream+c-aalto xml/xstream+c-fastinfo xml/javolution xml/fastinfo-manual
-[done]
-
-pre. create ser deser total size +dfl
-java-manual 63 847 632 1480 255 147
-kryo-manual 63 555 616 1171 211 131
-protostuff-manual 63 465 711 1176 239 150
-avro-generic 379 1822 1125 2947 221 133
-json/jackson/manual 63 1097 1539 2636 468 253
-json/protostuff-manual 63 1345 1816 3161 449 233
-json/google-gson/manual 63 3696 3756 7452 468 253
-json/json.simple/manual 63 6184 8059 14243 495 269
-json/json-smart/manual/tree 63 5314 4088 9402 495 269
-json/org.json/manual/tree 63 6989 8413 15403 485 259
-json/argo-manual/tree 63 66575 14578 81153 485 263
-smile/jackson/manual 63 939 1092 2031 341 244
-bson/mongodb 64 3422 7762 11184 495 278
-xml/woodstox-manual 63 3159 4578 7737 653 304
-xml/aalto-manual 63 2077 3093 5170 653 304
-xml/xstream+c-woodstox 63 5638 10506 16144 525 273
-xml/xstream+c-aalto 63 4893 8912 13805 525 273
-xml/xstream+c-fastinfo 63 8451 7971 16422 345 264
-xml/javolution 64 5544 8538 14082 504 263
-xml/fastinfo-manual 64 6959 5420 12379 377 284
-
-
-
-
-
-
-
-
diff --git a/tpc/run-bench.sh b/tpc/run-bench.sh
new file mode 100644
index 0000000..569bfbc
--- /dev/null
+++ b/tpc/run-bench.sh
@@ -0,0 +1,54 @@
+#! /usr/bin/env bash
+
+# added this, because the other runscripts did not work for me with recent cygwin installation
+
+mem=-Xmx256m
+clz=serializers.BenchmarkRunner
+
+cpgen=$(cat build/gen-cp)
+cplib=$(cat build/lib-cp)
+sep=':'
+# cygwin
+case "`uname`" in
+ CYGWIN*) sep=';' ;;
+esac
+
+cp=./build/bytecode/main$sep$cpgen$sep$cplib
+
+# for low run-to-run jitter (anyway expect ~3% run-to-run jitter)
+# testTime=60000
+# warmupTime=60000
+# turn off turbo boost and any other kind of dynamic clock scaling
+
+testTime=10000
+warmupTime=15000
+iter=2000
+
+mkdir ./results/tmp &> /dev/null
+
+if [ -n "$1" ]; then
+ sentence=$1
+else
+ rm ./results/tmp/*.txt
+ sentence=$(java -cp $cp serializers.BenchMarkExporter) # just grab all serializers
+fi
+
+sentence=${sentence//,/$'\n'} # change the colons to white space
+for word in $sentence
+do
+ echo "running $word .."
+ file=$word-result.txt
+ file=./results/tmp/${file//\//-} # change '/' to '-'
+ echo $word > $file
+ java $mem -cp $cp $clz -iterations=$iter -warmup-time=$warmupTime -testRunMillis=$testTime -include=$word data/media.1.cks >> $file
+done
+
+# find files with no numbers => errors
+echo ""
+echo "====================================================================================="
+echo "errors:"
+find ./results/tmp/. -print -type f -name "*.txt" -exec tail -1 {} \; | grep -B 1 create
+echo "====================================================================================="
+echo ""
+
+exec ./mk-stats.sh
\ No newline at end of file
diff --git a/tpc/run-cygwin.sh b/tpc/run-cygwin.sh
deleted file mode 100644
index c893562..0000000
--- a/tpc/run-cygwin.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /usr/bin/env bash
-
-# added this, because the other runscripts did not work for me with recent cygwin installation
-
-mem=-Xmx256m
-clz=serializers.BenchmarkRunner
-
-cpgen=$(cat build/gen-cp)
-cplib=$(cat build/lib-cp)
-sep=';'
-cp=./build/bytecode/main$sep$cpgen$sep$cplib
-
-java -version &> result.txt
-
-#echo ""
-#echo "CPGEN:"
-#echo $cpgen
-#echo ""
-#echo "CPLIB:"
-#echo $cplib
-#echo ""
-#echo "CP:"
-#echo $cp
-#echo ""
-
-
-# SIMPLE/GENERIC
-echo "" >> result.txt
-echo "SIMPLE/GENERIC:
Serializes any POJO tree without class specific optimization. Serialized classes are known in advance. No cycle detection/shared object detection is done." >> result.txt
-echo "" >> result.txt
-java $mem -cp $cp $clz -trials=500 -chart -include=java-built-in,hessian,kryo,fast-serialization,jboss-serialization,jboss-marshalling-river,protostuff,msgpack-databind,json/jackson/databind,json/jackson/db-afterburner,json/google-gson/databind,json/svenson-databind,json/flexjson/databind,json/fastjson/databind,smile/jackson/databind,smile/jackson/db-afterburner,smile/protostuff-runtime,bson/jackson/databind,xml/xstream+c,xml/jackson/databind-aalto,json/protostuff-runtime data/media.1.cks >> result.txt
-
-# DEFAULT
-echo "" >> result.txt
-echo "DEFAULT:
Serializes arbitrary object graphs, cycle detection enabled. Nothing is known in advance about the classes to serialize. Only serializers supporting full object graph serialization are included." >> result.txt
-echo "" >> result.txt
-java $mem -cp $cp $clz -trials=500 -chart -include=java-built-in-serializer,hessian,kryo-serializer,fast-serialization-shared,jboss-serialization data/media.1.cks >> result.txt
-
-# SIMPLE/SPECIFC: Serializes only specific classes using code generation or other special knowledge about the class.
-echo "" >> result.txt
-echo "SIMPLE/SPECIFC: Serializes only specific classes using code generation or other special knowledge about the class." >> result.txt
-echo "" >> result.txt
-java $mem -cp $cp $clz -trials=500 -chart -include=wobly,wobly-compact,kryo-opt,protobuf,protostuff,protobuf/protostuff,thrift,thrift-compact,avro,json/json-lib-databind,json/jsonij-jpath,json/jsonpath/json.simple data/media.1.cks >> result.txt
-
-# MANUAL: Serializes only specific classes using hand written serialization code.
-echo "" >> result.txt
-echo "MANUAL:
Serializes only specific classes using hand written serialization code." >> result.txt
-echo "" >> result.txt
-java $mem -cp $cp $clz -hidden -trials=500 -chart -include=java-manual,kryo-manual,protostuff-manual,json/jackson/manual,json/jackson/tree,json/protostuff-manual,json/google-gson/manual,json/google-gson/manual/tree,json/json.simple/manual,json/json.simple/manual/tree,json/json-smart/manual/tree,json/org.json/manual/tree,json/jsonij-manual/tree,json/argo-manual/tree,smile/jackson/manual,smile/protostuff-manual,bson/mongodb,xml/woodstox-manual,xml/aalto-manual,xml/fastinfo-manual,xml/xstream+c-woodstox,xml/xstream+c-aalto,xml/xstream+c-fastinfo,xml/javolution,avro-generic data/media.1.cks >> result.txt
-
diff --git a/tpc/src/serializers/BenchMarkExporter.java b/tpc/src/serializers/BenchMarkExporter.java
new file mode 100644
index 0000000..fc93c26
--- /dev/null
+++ b/tpc/src/serializers/BenchMarkExporter.java
@@ -0,0 +1,70 @@
+package serializers;
+
+/**
+ * Copyright (c) 2012, Ruediger Moeller. All rights reserved.
+ *