add benchmark.c for various workload, fix bug in tx.c