Commit b9f04300 authored by Boudewijn Rempt's avatar Boudewijn Rempt

benchmark writing bytes -- we have ~1.3 msec per mb, I guess

svn path=/trunk/koffice/; revision=1079689
parent a1608682
......@@ -40,6 +40,20 @@ void KisDatamanagerBenchmark::benchmarkCreation()
}
}
void KisDatamanagerBenchmark::benchmarkWriteBytes()
{
quint8 *p = new quint8[3];
memset(p, 0, 3);
KisDataManager dm(3, p);
quint8 *bytes = new quint8[3 * 1024 * 1024];
memset(bytes, 0, 3 * 1024 * 1024);
QBENCHMARK {
dm.writeBytes(bytes, 0, 0, 1024, 1024);
}
}
QTEST_KDEMAIN(KisDatamanagerBenchmark, GUI)
#include "kis_datamanager_benchmark.moc"
......@@ -29,7 +29,7 @@ private slots:
void initTestCase();
void benchmarkCreation();
void benchmarkWriteBytes();
};
#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