moved perf to a library