Skip to content

Instantly share code, notes, and snippets.

@epitron
Last active August 29, 2015 14:07
Show Gist options
  • Save epitron/db59ddfee95d4a0071e2 to your computer and use it in GitHub Desktop.
Save epitron/db59ddfee95d4a0071e2 to your computer and use it in GitHub Desktop.
Ruby's "lstat pyramid" (this is executed for every file it attempts to open)
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=200704, ...}) = 0
lstat("/usr/lib/ruby", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems/2.1.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems/2.1.0/gems", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib/slop.rb", {st_mode=S_IFREG|0644, st_size=19793, ...}) = 0
open("/usr/lib/ruby/gems/2.1.0/gems/slop-3.6.0/lib/slop/option.rb", O_RDONLY|O_CLOEXEC) = 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment