refactor the async perf test and change the encode