Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue#6: Add benchmark for opening device files
As we found out in <#6>, opening the character device special files for the more modern evdev API takes about 5000 times the time needed for opening the device for the old console API: console API device name: /dev/ttyN (e.g. /dev/tty4) time per open-and-close cycle: about 3us evdev API device name: /dev/input/by-path/platform-pcspkr-event-spkr time per open-and-close cycle: about 15ms To help with measuring those times, and timing them with /usr/bin/time we have now added "issue-6-benchmark". Run "make issue-6-benchmark" to build "issue-6-benchmark". Read "issue-6-benchmark.c" or run "issue-6-benchmark --help" for usage information. One peculiar thing to note is that apparently, the evdev API takes neither User time nor System time, but still needs wall clock time: Command being timed: "./issue-6-benchmark 5118303 /dev/tty2" User time (seconds): 0.54 System time (seconds): 13.37 Percent of CPU this job got: 94% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:14.75 Command being timed: "./issue-6-benchmark 958 /dev/input/by-path/platform-pcspkr-event-spkr" User time (seconds): 0.00 System time (seconds): 0.07 Percent of CPU this job got: 0% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:14.66
- Loading branch information