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

xdebug Profiler

xdebug Profiler

Short overview of xdebug profiler usage supported by qcachegrind

Peter Tilsen

June 23, 2015
Tweet

More Decks by Peter Tilsen

Other Decks in Technology

Transcript

  1. xdebug Profiler • What is this and what is it

    good for? • Installation • Configuration • xdebug Profiler plugin • Analysers • Qcachegrind • Demo
  2. xdebug Profiler
 What is this? • Build in extension of

    debug • Helps finding performance leaks • Helps inspecting code execution
  3. xdebug Profiler
 What is this? • Three major functions •

    Monitor execution time of each and all methods called during one request • Visualise most consuming execution 
 (Callee Map) • Visualise call history
 (Call Graph)
  4. Installation • Part of xdebug (http://xdebug.org/) • Multiple ways to

    install • Precompiled package for windows, PEAR/PECL, source
  5. Configuration 
 remote profiling • Enable remote profiling 
 debug.profiler_enable_trigger=1

    • requires remote enabler • Recommend to use browser plugin xdebug enabler
  6. Configuration
 cachegrind.out • Params for additional verbosity 
 cachegrind.out.%R-%s-%t •

    R $_SERVER[‘REQUEST_URI'] • s script name • t timestamp (seconds) • see http://xdebug.org/docs/ all_settings#trace_output_name for compete list
  7. Analysers • Platform/OS related analysers ported from kcachegrind • wincachegrind

    • kcachegrind • qcachegrind • Further analysers • phpstrom (embedded plugin) • etc.
  8. Analysers
 qcachegrind • What should I take a closer look

    at? • Time • Callee Map • Call Graph