refactor save current perf code and switch temp file to QByteArray