diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 00:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 00:07:34 +0300 |
commit | 909dcab6e1f82095408cf4adfe099b463f094301 (patch) | |
tree | d8b4ee0cf1a5313b75c7b039ae52b74d03c6bfd6 /spec/support | |
parent | d2f2219fd58e572c10d77183e2f65de8fcc8df96 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/rspec_run_time.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/rspec_run_time.rb b/spec/support/rspec_run_time.rb index 977d4885624..3491e5f733a 100644 --- a/spec/support/rspec_run_time.rb +++ b/spec/support/rspec_run_time.rb @@ -87,7 +87,8 @@ module Support unless @last_elapsed_seconds.nil? || elapsed_seconds - @last_elapsed_seconds < 1 output.puts \ "# [RSpecRunTime] RSpec elapsed time: #{readable_duration(elapsed_seconds)}. " \ - "#{current_rss_in_megabytes}\n\n" + "#{current_rss_in_megabytes}. " \ + "#{load_average}\n\n" end @last_elapsed_seconds = elapsed_seconds @@ -98,6 +99,10 @@ module Support "Current RSS: ~#{rss_in_megabytes.round}M" end + + def load_average + `uptime`[/(load average:[^\n]+)/, 1] + end end end end |