.benchmarks

git-svn-id: svn://ultimatepp.org/upp/trunk@12487 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-11-08 22:41:28 +00:00
parent 575deb9c32
commit 88757bbd66
5 changed files with 80 additions and 6 deletions

View file

@ -57,7 +57,7 @@ void App::Print()
void App::Benchmark()
{
double tm[2];
ImageBuffer ib(1024, 768);
ImageBuffer ib(2000, 2000);
for(int pass = 0; pass < 1 + !!ctrl.mt; pass++) {
int time0 = GetTickCount();
int n = 0;
@ -67,7 +67,9 @@ void App::Benchmark()
time = GetTickCount();
if(time - time0 > 1000) break;
sw.Co(pass);
sw.Begin();
DoPaint(sw);
sw.End();
n++;
}
tm[pass] = double(time - time0) / n;