| 1335 | } |
| 1336 | |
| 1337 | void PluginManagerPrivate::profilingSummary() const |
| 1338 | { |
| 1339 | if (!m_profileTimer.isNull()) { |
| 1340 | typedef QMultiMap<int, const PluginSpec *> Sorter; |
| 1341 | Sorter sorter; |
| 1342 | int total = 0; |
| 1343 | |
| 1344 | QHash<const PluginSpec *, int>::ConstIterator it1 = m_profileTotal.constBegin(); |
| 1345 | QHash<const PluginSpec *, int>::ConstIterator et1 = m_profileTotal.constEnd(); |
| 1346 | for (; it1 != et1; ++it1) { |
| 1347 | sorter.insert(it1.value(), it1.key()); |
| 1348 | total += it1.value(); |
| 1349 | } |
| 1350 | |
| 1351 | Sorter::ConstIterator it2 = sorter.begin(); |
| 1352 | Sorter::ConstIterator et2 = sorter.end(); |
| 1353 | for (; it2 != et2; ++it2) |
| 1354 | qDebug("%-22s %8dms ( %5.2f%% )", qPrintable(it2.value()->name()), |
| 1355 | it2.key(), 100.0 * it2.key() / total); |
| 1356 | qDebug("Total: %8dms", total); |
| 1357 | } |
| 1358 | } |
| 1359 | |
| 1360 | static inline QString getPlatformName() |
| 1361 | { |