Sha256: 853d6bc7dd12f628b24faf8af91499869cabcb85d473f0d54d5db97237b7f92b

Contents?: true

Size: 456 Bytes

Versions: 21

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module Buildkite::TestCollector
  class Object
    module CustomObjectSleep
      def sleep(duration = nil)
        tracer = Buildkite::TestCollector::Uploader.tracer
        tracer&.enter("sleep")

        if duration
          super(duration)
        else
          super()
        end
      ensure
        tracer&.leave
      end
    end

    def self.configure
      ::Object.prepend(CustomObjectSleep)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
buildkite-test_collector-2.7.2 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.7.1 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.7.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.6.1 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.6.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.5.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.4.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.3.2 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.3.1 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.3.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.2.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.1.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.1.0.pre lib/buildkite/test_collector/object.rb
buildkite-test_collector-2.0.0.pre lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.5.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.4.2 lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.4.1 lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.3.1 lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.3.0 lib/buildkite/test_collector/object.rb
buildkite-test_collector-1.2.5 lib/buildkite/test_collector/object.rb