34 const int parentDepth = parent.split(
'/' ).length();
35 for (
auto it = mProfileTimes.constBegin(); it != mProfileTimes.constEnd(); ++it )
37 if ( !parent.isEmpty() && !it->first.startsWith( parent +
'/' ) )
40 if ( it->first.isEmpty() )
43 const QStringList groups = it->first.split(
'/' );
44 if ( parent.isEmpty() )
46 if ( !res.contains( groups.at( 0 ) ) )
47 res << groups.at( 0 );
51 if ( !res.contains( groups.at( parentDepth ) ) )
52 res << groups.at( parentDepth );
60 mProfileTime.push( QElapsedTimer() );
61 mProfileTime.top().restart();
62 QString cleanedName = name;
63 cleanedName.replace(
'/',
'_' );
64 mCurrentName.push( cleanedName );
70 for (
const QString &group : qgis::as_const( mCurrentName ) )
72 name += name.isEmpty() || name.right( 1 ) ==
'/' ? group :
'/' + group;
76 double timing = mProfileTime.top().elapsed() / 1000.0;
79 mProfileTimes << qMakePair( name, timing );
80 QgsDebugMsgLevel( QStringLiteral(
"PROFILE: %1 - %2" ).arg( name ).arg( timing ), 2 );
85 if ( !name.isEmpty() )
87 for (
auto it = mProfileTimes.constBegin(); it != mProfileTimes.constEnd(); ++it )
89 if ( it->first == name )
98 for (
auto it = mProfileTimes.constBegin(); it != mProfileTimes.constEnd(); ++it )
100 if ( it->first.count(
'/' ) == 0 )
109 mProfileTimes.clear();
115 for (
auto it = mProfileTimes.constBegin(); it != mProfileTimes.constEnd(); ++it )