11
12
13
14
15
16
17
18
54 const char *fn = QTestResult::currentTestFunction() ? QTestResult::currentTestFunction()
56 const char *tag = QTestResult::currentDataTag() ? QTestResult::currentDataTag() :
"";
57 const char *gtag = QTestResult::currentGlobalDataTag()
58 ? QTestResult::currentGlobalDataTag()
60 const char *filler = (tag[0] && gtag[0]) ?
":" :
"";
62 const char *metric = QTest::benchmarkMetricName(result.measurement.metric);
66 std::snprintf(buf,
sizeof(buf),
"\"%s\",\"%s%s%s\",\"%s\",%.13g,%.13g,%u\n",
67 fn, gtag, filler, tag, metric,
73void QCsvBenchmarkLogger::addMessage(QAbstractTestLogger::MessageTypes,
const QString &,
const char *,
int)
void outputString(const char *msg)
Convenience method to write msg to the output stream.
QCsvBenchmarkLogger(const char *filename)
void addIncident(IncidentTypes type, const char *description, const char *file=nullptr, int line=0) override
This virtual method is called when an event occurs that relates to the resolution of the test.
void enterTestFunction(const char *function) override
This virtual method is called before each test function is invoked.
void addBenchmarkResult(const QBenchmarkResult &result) override
This virtual method is called after a benchmark has been run enough times to produce usable data.
void stopLogging() override
Called after the end of a test run.
void leaveTestFunction() override
This virtual method is called after a test function has completed, to match \l enterTestFunction().
void startLogging() override
Called before the start of a test run.