X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6a59d473c1574eec4db1f83b5d1a963b4f976e5a..42e6998c32f8d5553133e4b0b3ea02cd0c6f5554:/services/api/test/helpers/time_block.rb diff --git a/services/api/test/helpers/time_block.rb b/services/api/test/helpers/time_block.rb index a3b03ff2ba..5c753731df 100644 --- a/services/api/test/helpers/time_block.rb +++ b/services/api/test/helpers/time_block.rb @@ -8,4 +8,16 @@ class ActiveSupport::TestCase $stderr.puts "#{t1 - t0}s #{label}" end end + + def vmpeak c + open("/proc/self/status").each_line do |line| + print "Begin #{c} #{line}" if (line =~ /^VmHWM:/) + end + n = yield + open("/proc/self/status").each_line do |line| + print "End #{c} #{line}" if (line =~ /^VmHWM:/) + end + n + end + end