AbstractFileManagerPlugin import benchmark

Authored by rjvbb on Oct 27 2017, 12:19 PM.

Description

AbstractFileManagerPlugin import benchmark

Benchmarks the duration of importing a directory as a project, something
that can be determined largely by the time it takes to set up a
KDirWatch instance monitoring the entire tree for changes.

Current results using the gcc 7.2.0 source tree:

On Linux (kernel 4.9.30-ck1 on a 1.6Ghz N3150 with 8Gb RAM and using ZFS
on a Seagate SSHD):

perf stat -r 3 abstractfilemanagerpluginimportbenchmark gcc-7.2.0

KDirWatch backend: Inotify
Starting import of project gcc-7.2.0

creating dirwatcher took 1.265 seconds

importing project 0 took 3.162 seconds
Done in 4.428 seconds total
KDirWatch backend: Inotify
Starting import of project gcc-7.2.0

creating dirwatcher took 1.232 seconds

importing project 0 took 3.098 seconds
Done in 4.331 seconds total
KDirWatch backend: Inotify
Starting import of project gcc-7.2.0

creating dirwatcher took 1.307 seconds

importing project 0 took 3.14 seconds
Done in 4.448 seconds total

Performance counter stats for 'abstractfilemanagerpluginimportbenchmark gcc-7.2.0' (3 runs):

  5115.785502      task-clock:u (msec)       #    0.976 CPUs utilized            ( +-  0.84% )
            0      context-switches:u        #    0.000 K/sec
            0      cpu-migrations:u          #    0.000 K/sec
       23,868      page-faults:u             #    0.005 M/sec                    ( +-  0.86% )
4,749,860,940      cycles:u                  #    0.928 GHz                      ( +-  0.14% )
3,097,364,964      instructions:u            #    0.65  insn per cycle           ( +-  0.01% )
  741,470,473      branches:u                #  144.938 M/sec                    ( +-  0.02% )
   23,852,653      branch-misses:u           #    3.22% of all branches          ( +-  0.23% )

  5.241247911 seconds time elapsed                                          ( +-  0.76% )

env KDIRWATCH_METHOD=QFSWatch time perf stat -r 3 abstractfilemanagerpluginimportbenchmark gcc-7.2.0

KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 183.192 seconds

importing project 0 took 3.54 seconds
Done in 186.734 seconds total
KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 176.655 seconds

importing project 0 took 4.017 seconds
Done in 180.672 seconds total
KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 175.662 seconds

importing project 0 took 3.14 seconds
Done in 178.803 seconds total

Performance counter stats for 'abstractfilemanagerpluginimportbenchmark gcc-7.2.0' (3 runs):

  175971.327864      task-clock:u (msec)       #    0.959 CPUs utilized            ( +-  1.38% )
              0      context-switches:u        #    0.000 K/sec
              0      cpu-migrations:u          #    0.000 K/sec
         34,114      page-faults:u             #    0.194 K/sec                    ( +-  0.48% )
310,070,244,556      cycles:u                  #    1.762 GHz                      ( +-  0.20% )
 54,088,827,245      instructions:u            #    0.17  insn per cycle           ( +-  0.00% )
  8,733,088,527      branches:u                #   49.628 M/sec                    ( +-  0.00% )
    206,976,905      branch-misses:u           #    2.37% of all branches          ( +-  0.35% )

  183.439620257 seconds time elapsed                                          ( +-  1.32% )

On Mac (OS X 10.9.5 on a 2.7Ghz i7, 12Gb RAM, compressed HFS+ on a
Hitachi SSD):

repeat 3 time abstractfilemanagerpluginimportbenchmark gcc-7.2.0

KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 86.876 seconds

importing project 0 took 2.895 seconds
Done in 89.772 seconds total
75.877 user_cpu 11.942 kernel_cpu 1:31.34 total_time 96.1%CPU
KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 88.521 seconds

importing project 0 took 2.679 seconds
Done in 91.2 seconds total
77.313 user_cpu 12.010 kernel_cpu 1:32.54 total_time 96.5%CPU
KDirWatch backend: QFSWatch
Starting import of project gcc-7.2.0

creating dirwatcher took 85.653 seconds

importing project 0 took 2.591 seconds
Done in 88.244 seconds total
75.125 user_cpu 11.788 kernel_cpu 1:29.56 total_time 97.0%CPU
228.320 user_cpu 35.749 kernel_cpu 4:33.46 total_time 96.5%CPU

Differential Revision: https://phabricator.kde.org/D8059

Details