diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-06-04 10:04:36 -0600 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-06-04 10:04:36 -0600 |
commit | 4c6b1fc23c72dcde5456865103945ce7f228bfef (patch) | |
tree | 2bb955cef035b2d84c4d6a4a67b7d30d9c3b0265 /lib | |
parent | e9ae881c9a2934beaefbc687c0de21fbc77b0ef2 (diff) | |
download | gitlab-ce-4c6b1fc23c72dcde5456865103945ce7f228bfef.tar.gz |
Add comment to clarify system proc stat field61964-unicorn-instrumentation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/metrics/system.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/metrics/system.rb b/lib/gitlab/metrics/system.rb index 81bd799bd1e..33c0de91c11 100644 --- a/lib/gitlab/metrics/system.rb +++ b/lib/gitlab/metrics/system.rb @@ -35,6 +35,8 @@ module Gitlab def self.process_start_time fields = File.read('/proc/self/stat').split + # fields[21] is linux proc stat field "(22) starttime". + # The value is expressed in clock ticks, divide by clock ticks for seconds. ( fields[21].to_i || 0 ) / clk_tck end else |