add perf measurement
write result to file