Skip to content

Commit

Permalink
Merge pull request #446 from Shopify/remove-conflict-benchmarks
Browse files Browse the repository at this point in the history
Remove broken conflict benchmarks
  • Loading branch information
dylanahsmith authored Mar 16, 2020
2 parents 62565b7 + bb5a736 commit ff8c02e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,5 @@ script:

cache: bundler

matrix:
exclude:
- rvm: 2.2.6
gemfile: gemfiles/Gemfile.rails-edge

notifications:
email: false
42 changes: 0 additions & 42 deletions performance/cache_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,6 @@ def prepare
end
end

module ConflictRunner
def prepare
super
records = (1..@count).map { |id| ::Item.find(id) }
orig_resolve_cache_miss = ::Item.method(:resolve_cache_miss)

::Item.define_singleton_method(:resolve_cache_miss) do |id|
records[id - 1].expire_cache
orig_resolve_cache_miss.call(id)
end
IdentityCache.cache.clear
end
end

module DeletedConflictRunner
include ConflictRunner
def prepare
super
(1..@count).each { |i| ::Item.find(i).expire_cache }
end
end

class EmbedRunner < CacheRunner
def setup_models
super
Expand Down Expand Up @@ -161,16 +139,6 @@ class FetchEmbedDeletedRunner < EmbedRunner
end
CACHE_RUNNERS << FetchEmbedDeletedRunner

class FetchEmbedConflictRunner < EmbedRunner
include ConflictRunner
end
CACHE_RUNNERS << FetchEmbedConflictRunner

class FetchEmbedDeletedConflictRunner < EmbedRunner
include DeletedConflictRunner
end
CACHE_RUNNERS << FetchEmbedDeletedConflictRunner

class NormalizedRunner < CacheRunner
def setup_models
super
Expand Down Expand Up @@ -204,13 +172,3 @@ class FetchNormalizedDeletedRunner < NormalizedRunner
include DeletedRunner
end
CACHE_RUNNERS << FetchNormalizedDeletedRunner

class FetchNormalizedConflictRunner < EmbedRunner
include ConflictRunner
end
CACHE_RUNNERS << FetchNormalizedConflictRunner

class FetchNormalizedDeletedConflictRunner < EmbedRunner
include DeletedConflictRunner
end
CACHE_RUNNERS << FetchNormalizedDeletedConflictRunner

0 comments on commit ff8c02e

Please sign in to comment.