Skip to content

Support real-time profiling with flame graphs. Enables more accurate performance profiling.

Support real-time profiling with flame graphs. Enables more accurate performance profiling.

Enhanced Performance Profiling for GitLab

Profiles:

  1. SQL call stacks,
  2. flame graph [interactive visual representation for interval sampling of call stack]
  3. garbage collection stats
  4. memory stats by GEM
  5. trace all exceptions raised, even if caught
  6. heap analysis

When enabled [dev[all_users+anonymous], test[all_users+anonymous], production[admin_user_only], this performance profiling allows the following query suffixes on each incoming URL

This tool has its origins at stackoverflow.com in their production environment.

Available URL queries:

  pp=help : display help screen
  pp=env : display the rack environment
  pp=skip : skip mini profiler for this request
  pp=no-backtrace : don't collect stack traces from all the SQL executed (sticky, use pp=normal-backtrace to enable)
  pp=normal-backtrace (*) : collect stack traces from all the SQL executed and filter normally
  pp=full-backtrace : enable full backtraces for SQL executed (use pp=normal-backtrace to disable)
  pp=disable : disable profiling for this session
  pp=enable : enable profiling for this session (if previously disabled)
  pp=profile-gc : perform gc profiling on this request, analyzes ObjectSpace generated by request (ruby 1.9.3 only)
  pp=profile-memory : requires the memory_profiler gem, new location based report
  pp=flamegraph : works best on Ruby 2.0, a graph representing sampled activity (requires the flamegraph gem).
  pp=flamegraph&flamegraph_sample_rate=1: creates a flamegraph with the specified sample rate (in ms). Overrides value set in config
  pp=flamegraph_embed : works best on Ruby 2.0, a graph representing sampled activity (requires the flamegraph gem), embedded resources for use on an intranet.
  pp=trace-exceptions : requires Ruby 2.0, will return all the spots where your application raises exceptions
  pp=analyze-memory : requires Ruby 2.0, will perform basic memory analysis of heap

Screenshots

Flame_Graph_of_Page.pdf

Profiling_Results.pdf

Does this MR meet the acceptance criteria?

- [ ] Changelog entry added, if necessary

- [ ] API support added

see also:

Edited by username-removed-178117

Merge request reports