MCPcopy Create free account
hub / github.com/KDE/labplot / statistic

Method statistic

tests/backend/Retransform/RetransformTest.cpp:2068–2081  ·  view source on GitHub ↗

! * \brief RetransformCallCounter::statistic * Returns a statistic how often retransform was called for a specific element * They key is the path of the element and the value is the value how often * retransform was called * \param includeSuppressed. If true all retransforms even the suppressed once will * be counted. If false only the retransforms which are really executed are counted * \r

Source from the content-addressed store, hash-verified

2066 * \return
2067 */
2068QHash<QString, int> RetransformCallCounter::statistic(bool includeSuppressed) {
2069 QHash<QString, int> result;
2070 for (auto& log : logsRetransformed) {
2071 const auto& path = log.aspect->path();
2072 if (!includeSuppressed && log.suppressed)
2073 continue;
2074
2075 if (!result.contains(path))
2076 result.insert(path, 1);
2077 else
2078 result.insert(path, result.take(path) + 1);
2079 }
2080 return result;
2081}
2082
2083/*!
2084 * \brief RetransformCallCounter::elementLogCount

Callers 3

xyFunctionCurveMethod · 0.80

Calls 3

insertMethod · 0.80
pathMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected