D9822: Add benchmarks for KDirWatch
dfaure added a comment. Herald edited subscribers, added: kde-frameworks-devel; removed: Frameworks. Hi Milian, The benchNotifyWatcher() test seems to fail on CI. Can you take a look? https://build.kde.org/job/Frameworks/view/Everything/job/kcoreaddons/job/kf5-qt5%20SUSEQt5.10/6/testReport/projectroot/autotests/kdirwatch_qfswatch_unittest/ FAIL! : KDirWatch_UnitTest::benchNotifyWatcher() Compared values are not the same Actual ((spy.count())): 7442 Expected (numFiles) : 7810 Loc: [/home/jenkins/workspace/Frameworks/kcoreaddons/kf5-qt5 SUSEQt5.10/autotests/kdirwatch_unittest.cpp(843)] REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D9822 To: mwolff, dfaure Cc: kde-frameworks-devel, michaelh, ngraham, bruns, #frameworks
D9822: Add benchmarks for KDirWatch
This revision was automatically updated to reflect the committed changes. Closed by commit R244:421e85344db7: Add benchmarks for KDirWatch (authored by mwolff). REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9822?vs=25368=25583 REVISION DETAIL https://phabricator.kde.org/D9822 AFFECTED FILES autotests/kdirwatch_unittest.cpp To: mwolff, dfaure Cc: #frameworks
D9822: Add benchmarks for KDirWatch
dfaure accepted this revision. This revision is now accepted and ready to land. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D9822 To: mwolff, dfaure Cc: #frameworks
D9822: Add benchmarks for KDirWatch
mwolff updated this revision to Diff 25368. mwolff edited the summary of this revision. mwolff added a comment. format results on phab REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9822?vs=25367=25368 REVISION DETAIL https://phabricator.kde.org/D9822 AFFECTED FILES autotests/kdirwatch_unittest.cpp To: mwolff, dfaure Cc: #frameworks
D9822: Add benchmarks for KDirWatch
mwolff updated this revision to Diff 25367. mwolff edited the summary of this revision. mwolff added a comment. fixup commit message REPOSITORY R244 KCoreAddons CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D9822?vs=25169=25367 REVISION DETAIL https://phabricator.kde.org/D9822 AFFECTED FILES autotests/kdirwatch_unittest.cpp To: mwolff, dfaure Cc: #frameworks
D9822: Add benchmarks for KDirWatch
dfaure added a comment. "The third one touches all files in the tree and measure how long it takes until all dirty signals arrive. If you subtract that measurement from the third benchmark" Did you mean, if you subtract the first benchmark from the third benchmark? "That measurement" is ambiguous at this point, I first thought it referred to "the third one", but surely this isn't about subtracting third from third ;-) REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D9822 To: mwolff, dfaure Cc: #frameworks
D9822: Add benchmarks for KDirWatch
mwolff created this revision. mwolff added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. mwolff requested review of this revision. REVISION SUMMARY All benchmarks create a relatively large directory tree and then watch that recursively. On my system, the timings are: RESULT : KDirWatch_UnitTest::benchCreateTree(): 34.2 msecs per iteration (total: 342, iterations: 10) PASS : KDirWatch_UnitTest::benchCreateWatcher() RESULT : KDirWatch_UnitTest::benchCreateWatcher(): 13.6 msecs per iteration (total: 137, iterations: 10) PASS : KDirWatch_UnitTest::benchNotifyWatcher() RESULT : KDirWatch_UnitTest::benchNotifyWatcher(): 113.7 msecs per iteration (total: 1,138, iterations: 10) Note that this time includes wait/sleep time and the latency induced by the kernel for the inotify events to arrive. Measuring on-CPU time can be done by passing `-perf` to the benchmarks: PASS : KDirWatch_UnitTest::benchCreateTree(): RESULT : KDirWatch_UnitTest::benchCreateTree(): 165,910,830.4 CPU cycles per iteration (total: 1,659,108,304, iterations: 10) PASS : KDirWatch_UnitTest::benchCreateWatcher() RESULT : KDirWatch_UnitTest::benchCreateWatcher(): 64,014,469.8 CPU cycles per iteration (total: 640,144,699, iterations: 10) PASS : KDirWatch_UnitTest::benchNotifyWatcher() RESULT : KDirWatch_UnitTest::benchNotifyWatcher(): 316,077,005.5 CPU cycles per iteration (total: 3,160,770,055, iterations: 10) The first benchmark measures the time it takes to create the large directory. See below for why this is useful information. The second measures how long it takes to add the root dir and its contents recursively. The third one touches all files in the tree and measure how long it takes until all dirty signals arrive. If you subtract that measurement from the third benchmark, you arrive at the overhead imposed by KDirWatch. At this point, it's quite high! REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D9822 AFFECTED FILES autotests/kdirwatch_unittest.cpp To: mwolff, dfaure Cc: #frameworks