perf_check 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb29e570cff26d9c406b0c00f33ff23ae995d58e
4
- data.tar.gz: ebda52213a4941d5295aa53463a5d28e28bf6cf2
3
+ metadata.gz: 5c171115c8d6a1dfc9d161a9bcf14ac4ae76c2e0
4
+ data.tar.gz: 17ec095ca30b9d85930e030475f9bcaf635f643f
5
5
  SHA512:
6
- metadata.gz: 33a44a973a4b30bffbf46ad429c9b8ae1097981afab251a65a60e130de94d7d60b422ae42ad9c1212befd1d83a9fa01b82f14958f0cca6526c13db6401cb2e01
7
- data.tar.gz: 770e9614a6d3349fa0df0770158f0a4e30ca5adc048a4bd076dc6cf17adb897b3924c70bb294be5de799f8c90ba975e716d7b43ce409c0b1fce25a18389350ca
6
+ metadata.gz: a2fd40b01892fde942cdb1fee0cc63ede390519415809e9e3e61e6c3fb21014f220f83908474b3490e75672738e0ad0d47ad798fe3658a9b69afbd281b7cecad
7
+ data.tar.gz: 2151b9f8e40122d05d24c10e7f89b451372895fff14de71e6c2b5b281886a1efb34f8afdd5648027032a4c024f6c423b041698cf09fa627e6bfe505408d24de9
data/bin/perf_check CHANGED
@@ -51,6 +51,10 @@ opts = OptionParser.new do |opts|
51
51
  options.reference = nil
52
52
  end
53
53
 
54
+ opts.on('--clear-cache', 'Call Rails.cache.clear before running benchmark') do
55
+ options.clear_cache = true
56
+ end
57
+
54
58
  opts.on('--302-success', 'Consider HTTP 302 code a successful request') do
55
59
  options.http_statuses.push(302)
56
60
  end
@@ -13,9 +13,12 @@ class PerfCheck
13
13
  end
14
14
 
15
15
  if ENV['PERF_CHECK']
16
- # Force cache_classes = true .... :\
16
+ # Force cacheing .... :\
17
17
  config = Rails::Application::Configuration
18
- config.send(:define_method, :cache_classes){true}
18
+ config.send(:define_method, :cache_classes){ true }
19
+
20
+ config = ActiveSupport::Configurable::Configuration
21
+ config.send(:define_method, :perform_caching){ true }
19
22
  end
20
23
  end
21
24
  end
data/lib/perf_check.rb CHANGED
@@ -62,6 +62,8 @@ class PerfCheck
62
62
 
63
63
  test_cases.each do |test|
64
64
  server.restart
65
+ Rails.cache.clear if options.clear_cache
66
+
65
67
  if options.login
66
68
  test.cookie = server.login(options.login, test)
67
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize