Commit 04021e8f authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Improve filter benchmark

parent 95fe27eb
......@@ -54,11 +54,18 @@ int main ( )
CZoneFilter::ZoneFilterConfig zoneFilterConfig;
CZoneFilter zeroZoneFilter ( zoneFilterConfig );
zoneFilterConfig.vpZones.emplace_back ( VistaVector3D ( 0, 0, 0 ), VistaVector3D ( 1, 1, 1 ) );
CZoneFilter oneZoneFilter ( zoneFilterConfig );
zoneFilterConfig.vpZones.emplace_back ( VistaVector3D ( 0, 0, 0 ), VistaVector3D ( 1, 1, 1 ) );
for ( int i = 0; i < 4; ++i)
zoneFilterConfig.vpZones.emplace_back ( VistaVector3D ( 0, 0, 0 ), VistaVector3D ( 1, 1, 1 ) );
CZoneFilter twoZoneFilter ( zoneFilterConfig );
zoneFilterConfig.vpZones.emplace_back ( VistaVector3D ( 0, 0, 0 ), VistaVector3D ( 1, 1, 1 ) );
for ( int i = 0; i < 5; ++i )
zoneFilterConfig.vpZones.emplace_back ( VistaVector3D ( 0, 0, 0 ), VistaVector3D ( 1, 1, 1 ) );
CZoneFilter threeZoneFilter ( zoneFilterConfig );
ITAStopWatch rateFilterSW;
......@@ -88,10 +95,13 @@ int main ( )
for ( auto& filter : filterVector )
{
for ( int i = 0; i < runs; ++i )
for ( int i = 0; i < runs / 1000; ++i )
{
filter.second->start ( );
auto result = filter.first->ChangeIsAudible ( prevUpdate, newUpdate );
for ( int j = 0; j < 1000; ++j )
{
auto result = filter.first->ChangeIsAudible ( prevUpdate, newUpdate );
}
filter.second->stop ( );
}
}
......
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