debian-mirror-gitlab/lib/gitlab/import_export/duration_measuring.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
389 B
Ruby
Raw Normal View History

2022-06-21 17:19:12 +05:30
# 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