mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Refactor logging of elapsed time
This commit is contained in:
1 parent
3727a12634
commit
f9f9b6b07b
7 files changed
+29
-44
No files matched your search
@@ -752,14 +752,13 @@ void RifReaderOpmCommon::setupInitAndRestartAccess()
|
||||
{
|
||||
try
|
||||
{
|
||||
const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RifReaderOpmCommon" );
|
||||
|
||||
if ( isLoggingEnabled )
|
||||
RiaLogging::resetTimer( "Starting import of meta data from " + QString::fromStdString( m_restartFileName ) );
|
||||
auto startTime = RiaLogging::currentTime();
|
||||
|
||||
m_restartFile = std::make_unique<EclIO::ERst>( m_restartFileName );
|
||||
|
||||
if ( isLoggingEnabled ) RiaLogging::logTimeElapsed( "Completed import of meta data" );
|
||||
const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RifReaderOpmCommon" );
|
||||
if ( isLoggingEnabled )
|
||||
RiaLogging::logElapsedTime( "Import of meta data from " + QString::fromStdString( m_restartFileName ), startTime );
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
@@ -940,7 +939,7 @@ void RifReaderOpmCommon::buildMetaData( RigEclipseCaseData* eclipseCaseData, caf
|
||||
auto task = progress.task( "Handling well information", 10 );
|
||||
if ( loadWellDataEnabled() && !m_restartFileName.empty() )
|
||||
{
|
||||
RiaLogging::resetTimer( "Start import of simulation well data" );
|
||||
auto startTime = RiaLogging::currentTime();
|
||||
|
||||
auto restartAccess = std::make_unique<RifEclipseUnifiedRestartFileAccess>();
|
||||
restartAccess->setRestartFiles( QStringList( QString::fromStdString( m_restartFileName ) ) );
|
||||
@@ -960,7 +959,7 @@ void RifReaderOpmCommon::buildMetaData( RigEclipseCaseData* eclipseCaseData, caf
|
||||
|
||||
restartAccess->close();
|
||||
|
||||
RiaLogging::logTimeElapsed( "Completed import of simulation well data" );
|
||||
RiaLogging::logElapsedTime( "Import of simulation well data", startTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user