Commit 3eb5a8ef authored by Boudewijn Rempt's avatar Boudewijn Rempt

benchmark: extent test

svn path=/trunk/koffice/; revision=1079701
parent 49388e93
......@@ -90,7 +90,18 @@ void KisDatamanagerBenchmark::benchmarkReadWriteBytes()
delete[] bytes;
}
void KisDatamanagerBenchmark::benchmarkExtent()
{
quint8 *p = new quint8[3];
memset(p, 0, 3);
KisDataManager dm(3, p);
quint8 *bytes = new quint8[3 * 1021 * 1084];
memset(bytes, 0, 3 * 1021 * 1084);
dm.writeBytes(bytes, 0, 0, 1021, 1084);
QBENCHMARK {
QRect extent = dm.extent();
}
}
QTEST_KDEMAIN(KisDatamanagerBenchmark, GUI)
#include "kis_datamanager_benchmark.moc"
......@@ -32,6 +32,7 @@ private slots:
void benchmarkWriteBytes();
void benchmarkReadBytes();
void benchmarkReadWriteBytes();
void benchmarkExtent();
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment