Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TBD

 TBD

Closing day talk I gave at RubyC in Kiev: http://rubyc.eu/

Further read:
- The Flame Graph: http://queue.acm.org/detail.cfm?id=2927301
- flamegraph gem: https://github.com/SamSaffron/flamegraph
- rack-mini-profiler: https://github.com/MiniProfiler/rack-mini-profiler
- ruby-prof-flamegraph: https://github.com/oozou/ruby-prof-flamegraph

Miha Rekar

June 04, 2016
Tweet

More Decks by Miha Rekar

Other Decks in Technology

Transcript

  1. WHOIS ! Software Developer " Ruby Slovenia organizer # Long

    Distance Runner $ Event Photographer ☕ Coffee Connoisseur
  2. WHOIS ! Software Developer " Ruby Slovenia organizer # Long

    Distance Runner $ Event Photographer ☕ Coffee Connoisseur & Special
  3. WHY AND WHAT • How SW is consuming CPU •

    DTrace is verbose and unreadable • Brendan Gregg • combine stack traces with common paths
  4. FLAME GRAPHS EXPLAINED • each box represents a function (a

    merged stack frame) • y-axis (vertical) shows stack depth • top function led directly to the profiling event • everything beneath it is ancestry (explains why) • x-axis (horizontal) shows the sample sorted alphabetically • box width shows the total time it was on-CPU
  5. Q&A A: a() → b() → c() → e() →

    f() f() was called by e(), e() was called by c(),…
  6. Q&A A: code path branches can reveal key functions:
 a()

    choose the b() path
 c() choose the e() path look for branches
  7. FURTHER READ • The Flame Graph
 http://queue.acm.org/detail.cfm?id=2927301 • flamegraph gem


    https://github.com/SamSaffron/flamegraph • rack-mini-profiler
 https://github.com/MiniProfiler/rack-mini-profiler • ruby-prof-flamegraph
 https://github.com/oozou/ruby-prof-flamegraph