Sha256: c23f0776a215b1ff425de112a165ba29549a6d3806031f84d6e95539942c5a75

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

# Trap interrupts to quit cleanly. See
# https://twitter.com/mitchellh/status/283014103189053442
Signal.trap('INT') { abort }

require 'bundler/setup'
require 'benchmark/ips'
require 'sidekiq-unique-jobs'

ITERATIONS ||= 10_000

Benchmark.ips do |x|
  x.config(time: 5, warmup: 2)
  x.report('new_shit') do |_times|
    SidekiqUniqueJobs::Scripts.call(:acquire_lock, nil, keys: [SecureRandom.hex], argv: [SecureRandom.hex])
  end
  x.compare!
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidekiq-unique-jobs-5.0.2 bin/bench
sidekiq-unique-jobs-5.0.1 bin/bench
sidekiq-unique-jobs-5.0.0 bin/bench