diff options
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 |