Add implementation for readwhilewriting benchmark.