Slightly improved benchmark code (outliers will now be dropped).
This commit is contained in:
parent
9b376cd2a8
commit
a3fdbee680
@ -35,7 +35,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 9
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 7
|
||||
#define VER_LAMEXP_BUILD 1448
|
||||
#define VER_LAMEXP_BUILD 1449
|
||||
#define VER_LAMEXP_CONFG 1348
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -395,13 +395,21 @@ void InitializationThread::runBenchmark(void)
|
||||
|
||||
for(size_t c = 1; c <= maxThreads; c++)
|
||||
{
|
||||
double delayAcc = 0.0;
|
||||
QList<double> delayLst;
|
||||
double delayAvg = 0.0;
|
||||
for(size_t i = 0; i < nLoops; i++)
|
||||
{
|
||||
delayAcc += doInit(c);
|
||||
delayLst << doInit(c);
|
||||
lamexp_clean_all_tools();
|
||||
}
|
||||
results.insert(c, (delayAcc / double(nLoops)));
|
||||
qSort(delayLst.begin(), delayLst.end());
|
||||
delayLst.takeLast();
|
||||
delayLst.takeFirst();
|
||||
for(QList<double>::ConstIterator iter = delayLst.constBegin(); iter != delayLst.constEnd(); iter++)
|
||||
{
|
||||
delayAvg += (*iter);
|
||||
}
|
||||
results.insert(c, (delayAvg / double(delayLst.count())));
|
||||
}
|
||||
|
||||
qWarning("\n----------------------------------------------");
|
||||
|
Loading…
Reference in New Issue
Block a user