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:
- SQL call stacks,
- flame graph [interactive visual representation for interval sampling of call stack]
- garbage collection stats
- memory stats by GEM
- trace all exceptions raised, even if caught
- 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
Does this MR meet the acceptance criteria?
- [ ] Changelog entry added, if necessary
- [ ] API support added
-
Tests
- [ ] Added for this feature/bug-
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please)
see also:
- https://gitlab.com/gitlab-org/gitlab-development-kit/issues/115
- GDK enables “production” like environment with class and query caching https://gitlab.com/gitlab-org/gitlab-development-kit/merge_requests/311
- https://gitlab.com/gitlab-com/infrastructure/issues/1882