Divide perf code into latency test and througput test