perf_check 0.0.14 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/perf_check/test_case.rb +7 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f32bd6505a1db202028e0e905779bf4d0ba84e9
4
- data.tar.gz: 50cecfa3a0f7ebc6c1ec29ae461f3664aa4384cb
3
+ metadata.gz: 206189556ad2cf4715e244faceaf080d9b919006
4
+ data.tar.gz: ccac24e750e16f5096e050b335e0f4dbb9c75a41
5
5
  SHA512:
6
- metadata.gz: b0aa955f9fe1536862c3b0712527de414077fc4f01ad4ce7f6d3b532b5c1650072cfc8903a3b3d8025ea63e4a5f0bdae8f46da905d96d8342174af673317f940
7
- data.tar.gz: 97943c106588134e841700329f88af12aebf1f96faca2d3e6e5b81f9ecda5a508e1e16aa28cd9260f778268c789aafe091a963663a9a585510518d9c90904cc9
6
+ metadata.gz: 57a0025e7c8ee476620b4a4c3f748e79b9cd86c6adb56aad5baed6bed6dcf49001ebd92ca3643d703db1f6082af480c988832380d0593cca71b43bf7982687a1
7
+ data.tar.gz: 19a85872206132dea420c82f20599619c8f36d6c01f4a2b3155afa92d612c458fcbc17daa72e7a3f026b8976a48838734d729c4f96af26db76a9bb38adaebc97
@@ -2,7 +2,7 @@
2
2
 
3
3
  class PerfCheck
4
4
  class TestCase
5
- attr_accessor :resource, :controller, :action
5
+ attr_accessor :resource, :controller, :action, :format
6
6
  attr_accessor :latencies, :cookie
7
7
  attr_accessor :this_latencies, :reference_latencies
8
8
 
@@ -15,6 +15,7 @@ class PerfCheck
15
15
 
16
16
  self.controller = params[:controller].split('/')[-1]
17
17
  self.action = params[:action]
18
+ self.format = params[:format]
18
19
  self.resource = route
19
20
  end
20
21
 
@@ -24,9 +25,13 @@ class PerfCheck
24
25
  print(" "+'server rss'.underline)
25
26
  puts(" "+'profiler data'.underline)
26
27
 
28
+ headers = {'Cookie' => "#{cookie}"}
29
+ unless self.format
30
+ headers['Accept'] = 'text/html,application/xhtml+xml,application/xml'
31
+ end
27
32
  options.number_of_requests.times do |i|
28
33
  profile = server.profile do |http|
29
- http.get(resource, {'Cookie' => "#{cookie}"})
34
+ http.get(resource, headers)
30
35
  end
31
36
 
32
37
  unless options.http_statuses.include? profile.response_code
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune