Several performance fixes (#9026)

* #9023 Performance: Use count instead of for loop

* #9023  Analyzer: Cache vector names for categories

* #9023 Performance : Use cached ensemble analyzer

* #9023 Performance : Add min/max values to ensemble statistics

* #9023 Performance : Improve statistics calculator

* #9023 Performance : Use high performance toInt()

* #9023 Performance : Build summary addresses in parallell
This commit is contained in:
Magne Sjaastad
2022-06-07 21:09:36 +02:00
committed by GitHub
parent fa1f189709
commit d36bf11c62
17 changed files with 331 additions and 82 deletions

View File

@@ -20,6 +20,7 @@
#include "gtest/gtest.h"
#include "QElapsedTimer"
#include "RigStatisticsMath.h"
//--------------------------------------------------------------------------------------------------
@@ -295,3 +296,37 @@ TEST( RigStatisticsMath, calculateStatisticsCurves )
EXPECT_DOUBLE_EQ( 1.0, mean );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST( RigStatisticsMath, DISABLED_performanceTesting )
{
RigStatisticsMath::PercentileStyle percentileStyle = RigStatisticsMath::PercentileStyle::REGULAR;
{
size_t timerCount = 10;
for ( size_t t = 0; t < timerCount; t++ )
{
QElapsedTimer timer;
timer.start();
size_t iterationCount = 10000;
for ( size_t i = 0; i < iterationCount; i++ )
{
size_t numberOfValues = 200;
std::vector<double> values( numberOfValues );
std::iota( values.begin(), values.end(), numberOfValues );
double mean = HUGE_VAL;
double p10 = HUGE_VAL;
double p50 = HUGE_VAL;
double p90 = HUGE_VAL;
RigStatisticsMath::calculateStatisticsCurves( values, &p10, &p50, &p90, &mean, percentileStyle );
}
auto testDuration = timer.elapsed();
std::cout << testDuration << "\n";
}
}
}