Find file
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (67 sloc) 1.77 KB
Chris Eppstein
Compass is on top of sass.
Best Practices
Sass is a compiler that generates CSS
CoffeeScript by Trevor Burnham at 11:35
Functions, variables, mixins, partials
* lsof
* strace
* ltrace
C code:
* perftools
* gdb
* tcpdump
* ngrep
* bleak_house
* gdb.rb
* memprof
Get the slides:
lsof (list open files for a pid)
shows app, ruby, shared libraries, file descriptors (0, 1, 2 are stdin, stdout, stderr)
tcpdump (dump tcp packets)
tcpdump -i eth0 -s 0 -nqA tcp dst port 3306
tcpdump -w <file>, load it up in WireShark
strace (trace system calls and signals)
A system call is a call that happens in system space not user space
-c: count and summarize
-p pid: attach to pid and trace.
stracing ruby: SIGVTALRM is sent every 10 ms (Ruby 1.8)
stracing ruby: sigprocmask
stracing ruby: tests -- result, posix_spawn gem sped up tests by 2x
ltrace (trace library calls)
A library call is a call that happens in user space (C)
rbtrace (trace ruby method calls)
require 'rbtrace'
rbtrace -p pid -m method
rbtrace -c <predefinedtracer>
perftools (Google's performance tools), a suite
perftools.rb (perftools for Ruby code)
Can do "wall-clock" time
Can also count objects created
rack-perftools (rack middleware for perftools.rb)
Adds URLs to your app (?profile=true)
gdb (the GNU debugger)
gdb <executable>
gdb <executable> <pid>
"where" "backtrace"
gdb.rb (gdb with MRI hooks)
gem install gdb.rb
"ruby objects classes"
memprof (heap visualizer for ruby)
analyze json output with mongodb/couchdb, jsawk/grep
"ab" tool
hotspots (a performance tool for rails)