How to validate the speed of your filesystem

How to validate the speed of your filesystem

This is a good benchmark to validate if your code is slow or its just the file look-ups on the filesystem.

We're listing all files in the node_modules folder.

Here's what it should look like:

time find node_modules -type f | wc -l

23224

real	0m1.782s
user	0m0.022s
sys	0m0.206s

Here's something clearly wrong:

time find node_modules -type f | wc -l

31426

real	1m24.501s
user	0m0.189s
sys	0m0.828s

Be aware that consecutive results may vary since some of the folder meta data can be cached by the kernel. So running this sequentially can have huge differences in time.