orgsync/stoplight

View on GitHub
bench/memory_bench.rb

Summary

Maintainability
A
35 mins
Test Coverage
# frozen_string_literal: true

require 'benchmark/ips'
require 'stoplight'

Benchmark.ips do |b|
  b.report('creating lambda')    { -> {} }
  b.report('calling lambda')     { -> {}.call }
  b.report('creating stoplight') { Stoplight('') {} }
  b.report('calling stoplight')  { Stoplight('') {}.run }

  b.compare!
end