diff options
author | Paul Lemire <paul.lemire350@gmail.com> | 2016-05-16 11:33:00 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-06-27 13:55:14 +0000 |
commit | 39c18309f368da8d1bca4fb5ec5399e39604a398 (patch) | |
tree | b02298fb0cbf21472f7e754beb8aa41550fe14a8 /src/core/jobs/qthreadpooler.cpp | |
parent | 17f72a7c1982a024291c571842741e3d00784bb7 (diff) |
QThreadPooler: append date to jobs trace file
Makes it easier to keep separate trace files as otherwise the trace file
was overwritten.
Change-Id: Ib980e13f36e7ad32f02d4ea9b79b720096f565b3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core/jobs/qthreadpooler.cpp')
-rw-r--r-- | src/core/jobs/qthreadpooler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp index bac7c0dd4..c49930f5a 100644 --- a/src/core/jobs/qthreadpooler.cpp +++ b/src/core/jobs/qthreadpooler.cpp @@ -45,6 +45,7 @@ #ifdef QT3D_JOBS_RUN_STATS #include <QFile> #include <QThreadStorage> +#include <QDateTime> #endif QT_BEGIN_NAMESPACE @@ -200,7 +201,7 @@ void QThreadPooler::writeFrameJobLogStats() static QScopedPointer<QFile> traceFile; static quint32 frameId = 0; if (!traceFile) { - traceFile.reset(new QFile(QStringLiteral("trace.qt3d"))); + traceFile.reset(new QFile(QStringLiteral("trace_") + QDateTime::currentDateTime().toString() + QStringLiteral(".qt3d"))); if (!traceFile->open(QFile::WriteOnly|QFile::Truncate)) qCritical("Failed to open trace file"); } @@ -217,7 +218,6 @@ void QThreadPooler::writeFrameJobLogStats() for (const QVector<JobRunStats> *storage : qAsConst(localStorages)) { - qDebug() << Q_FUNC_INFO << localStorages.size() << storage << storage->size(); for (const JobRunStats &stat : *storage) { traceFile->write(reinterpret_cast<const char *>(&stat), sizeof(JobRunStats)); } |