debian-mirror-gitlab/lib/gitlab/import_export/duration_measuring.rb
2022-06-21 17:19:12 +05:30

23 lines
389 B
Ruby

# frozen_string_literal: true
module Gitlab
module ImportExport
module DurationMeasuring
extend ActiveSupport::Concern
included do
attr_reader :duration_s
def with_duration_measuring
result = nil
@duration_s = Benchmark.realtime do
result = yield
end
result
end
end
end
end
end