Sha256: ed66e3c2b5a6165e97314ae628ad88a5eef1325d8afdc43adcacf3d8a12a326e

Contents?: true

Size: 424 Bytes

Versions: 75

Compression:

Stored size: 424 Bytes

Contents

require "spec_helper"

describe GitLab::Exporter::TimeTracker do
  it "tracks execution time" do
    expect(subject.track { sleep 0.1 }.time).to satisfy { |v| v >= 0.1 }
  end
end

describe GitLab::Exporter::Utils do
  it "excludes extraneous PIDs" do
    allow(described_class).to receive(:exec_pgrep).and_return("12345 my-process\n98765 sh\n")

    expect(described_class.pgrep("some-process")).to eq(["12345"])
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
gitlab-exporter-7.0.6 spec/util_spec.rb
gitlab-exporter-7.0.5 spec/util_spec.rb
gitlab-exporter-7.0.4 spec/util_spec.rb
gitlab-exporter-7.0.3 spec/util_spec.rb
gitlab-exporter-7.0.2 spec/util_spec.rb
gitlab-exporter-7.0.1 spec/util_spec.rb
gitlab-exporter-7.0.0 spec/util_spec.rb
gitlab-exporter-6.1.0 spec/util_spec.rb
gitlab-exporter-6.0.0 spec/util_spec.rb
gitlab-exporter-5.2.2 spec/util_spec.rb
gitlab-exporter-5.2.1 spec/util_spec.rb
gitlab-exporter-5.2.0 spec/util_spec.rb
gitlab-exporter-5.1.0 spec/util_spec.rb
gitlab-exporter-5.0.1 spec/util_spec.rb
gitlab-exporter-5.0.0 spec/util_spec.rb