mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
Refactor logging of elapsed time
This commit is contained in:
@@ -467,12 +467,7 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath( QString proje
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAction loadAction, RiaProjectModifier* projectModifier )
|
||||
{
|
||||
bool showDebugTiming = false;
|
||||
if ( showDebugTiming )
|
||||
{
|
||||
QString timingText = "RiaApplication::loadProject";
|
||||
RiaLogging::resetTimer( timingText );
|
||||
}
|
||||
auto startTime = RiaLogging::currentTime();
|
||||
|
||||
// First Close the current project
|
||||
|
||||
@@ -860,9 +855,10 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
RiaLogging::info( QString( "Completed open of project file : '%1'" ).arg( projectFileName ) );
|
||||
}
|
||||
|
||||
if ( showDebugTiming )
|
||||
bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RiaApplication" );
|
||||
if ( isLoggingEnabled )
|
||||
{
|
||||
RiaLogging::logTimeElapsed( "" );
|
||||
RiaLogging::logElapsedTime( QString( "Project file '%1' loaded" ).arg( projectFileName ), startTime );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user