added option to not writeAndFlush in benchmark