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-15.0.0 spec/util_spec.rb
gitlab-exporter-14.5.0 spec/util_spec.rb
gitlab-exporter-14.4.0 spec/util_spec.rb
gitlab-exporter-14.3.0 spec/util_spec.rb
gitlab-exporter-14.2.0 spec/util_spec.rb
gitlab-exporter-14.1.0 spec/util_spec.rb
gitlab-exporter-14.0.0 spec/util_spec.rb
gitlab-exporter-13.5.0 spec/util_spec.rb
gitlab-exporter-13.4.1 spec/util_spec.rb
gitlab-exporter-13.4.0 spec/util_spec.rb
gitlab-exporter-13.3.1 spec/util_spec.rb
gitlab-exporter-13.3.0 spec/util_spec.rb
gitlab-exporter-13.2.0 spec/util_spec.rb
gitlab-exporter-13.1.0 spec/util_spec.rb
gitlab-exporter-13.0.3 spec/util_spec.rb
gitlab-exporter-13.0.0 spec/util_spec.rb
gitlab-exporter-12.1.1 spec/util_spec.rb
gitlab-exporter-12.1.0 spec/util_spec.rb
gitlab-exporter-12.0.1 spec/util_spec.rb
gitlab-exporter-12.0.0 spec/util_spec.rb