Commit 9d308f71 authored by Stan Hu's avatar Stan Hu

Merge branch 'mk-stackprof-fixes' into 'master'

Adjust stackprof default sampling intervals

See merge request gitlab-org/gitlab!59630
parents ad555aa8 b9a0c978
...@@ -9,10 +9,10 @@ module Gitlab ...@@ -9,10 +9,10 @@ module Gitlab
DEFAULT_FILE_PREFIX = Dir.tmpdir DEFAULT_FILE_PREFIX = Dir.tmpdir
DEFAULT_TIMEOUT_SEC = 30 DEFAULT_TIMEOUT_SEC = 30
DEFAULT_MODE = :cpu DEFAULT_MODE = :cpu
# Sample interval as a frequency in microseconds (~100hz); appropriate for CPU profiles # Sample interval as a frequency in microseconds (~99hz); appropriate for CPU profiles
DEFAULT_INTERVAL_US = 10_000 DEFAULT_INTERVAL_US = 10_100
# Sample interval in event occurrences (n = every nth event); appropriate for allocation profiles # Sample interval in event occurrences (n = every nth event); appropriate for allocation profiles
DEFAULT_INTERVAL_EVENTS = 1_000 DEFAULT_INTERVAL_EVENTS = 100
# this is a workaround for sidekiq, which defines its own SIGUSR2 handler. # this is a workaround for sidekiq, which defines its own SIGUSR2 handler.
# by defering to the sidekiq startup event, we get to set up our own # by defering to the sidekiq startup event, we get to set up our own
......
...@@ -257,8 +257,8 @@ The following configuration options can be configured: ...@@ -257,8 +257,8 @@ The following configuration options can be configured:
Defaults to `cpu`. Defaults to `cpu`.
- `STACKPROF_INTERVAL`: Sampling interval. Unit semantics depend on `STACKPROF_MODE`. - `STACKPROF_INTERVAL`: Sampling interval. Unit semantics depend on `STACKPROF_MODE`.
For `object` mode this is a per-event interval (every `nth` event is sampled) For `object` mode this is a per-event interval (every `nth` event is sampled)
and defaults to `1000`. and defaults to `100`.
For other modes such as `cpu` this is a frequency and defaults to `10000` μs (100hz). For other modes such as `cpu` this is a frequency interval and defaults to `10100` μs (99hz).
- `STACKPROF_FILE_PREFIX`: File path prefix where profiles are stored. Defaults - `STACKPROF_FILE_PREFIX`: File path prefix where profiles are stored. Defaults
to `$TMPDIR` (often corresponds to `/tmp`). to `$TMPDIR` (often corresponds to `/tmp`).
- `STACKPROF_TIMEOUT_S`: Profiling timeout in seconds. Profiling will - `STACKPROF_TIMEOUT_S`: Profiling timeout in seconds. Profiling will
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment