httperfrb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/HISTORY.md +4 -0
  2. data/lib/httperf.rb +50 -5
  3. metadata +8 -8
data/HISTORY.md CHANGED
@@ -1,6 +1,10 @@
1
1
  HTTPerf.rb
2
2
  ==========
3
3
 
4
+ ### 0.0.2
5
+
6
+ * fix a few critical bugs with params - 0.0.1 is bad
7
+
4
8
  ### 0.0.1
5
9
 
6
10
  * Initial release.
data/lib/httperf.rb CHANGED
@@ -1,12 +1,55 @@
1
+ # @author Joshua Mervine <joshua@mervine.net>
1
2
  class HTTPerf
2
- VERSION = "0.0.1"
3
+ # gem version
4
+ VERSION = "0.0.2"
3
5
 
6
+ # availbe instance methods
4
7
  @options, @command = nil
5
8
 
6
9
  # initialize with (optional):
7
- # - options: see 'man httperf'
10
+ # - options: see below for options
11
+ # - see 'man httfperf' for details
8
12
  # - path: path to httperf
9
13
  # - e.g. /usr/bin/httperf
14
+ #
15
+ # available options:
16
+ # - add-header
17
+ # - burst-length
18
+ # - client
19
+ # - close-with-reset
20
+ # - debug
21
+ # - failure-status
22
+ # - hog
23
+ # - http-version
24
+ # - max-connections
25
+ # - max-piped-calls
26
+ # - method
27
+ # - no-host-hdr
28
+ # - num-calls
29
+ # - num-conns
30
+ # - period
31
+ # - port
32
+ # - print-reply
33
+ # - print-request
34
+ # - rate
35
+ # - recv-buffer
36
+ # - retry-on-failure
37
+ # - send-buffer
38
+ # - server
39
+ # - server-name
40
+ # - session-cookies
41
+ # - ssl
42
+ # - ssl-ciphers
43
+ # - ssl-no-reuse
44
+ # - think-timeout
45
+ # - timeout
46
+ # - uri
47
+ # - verbose
48
+ # - version
49
+ # - wlog
50
+ # - wsess
51
+ # - wsesslog
52
+ # - wset
10
53
  def initialize options={}, path=nil
11
54
  options.each_key do |k|
12
55
  raise "#{k} is an invalid httperf param" unless params.keys.include?(k)
@@ -39,6 +82,7 @@ class HTTPerf
39
82
  end
40
83
 
41
84
  private
85
+ # build commandline options string
42
86
  def options
43
87
  opts = ""
44
88
  @options.each do |key,val|
@@ -47,6 +91,7 @@ class HTTPerf
47
91
  opts
48
92
  end
49
93
 
94
+ # define httperf available options
50
95
  def params
51
96
  {
52
97
  "add-header" => nil,
@@ -63,10 +108,10 @@ class HTTPerf
63
108
  "no-host-hdr" => nil,
64
109
  "num-calls" => nil,
65
110
  "num-conns" => nil,
66
- "period [d|u|e" => nil,
111
+ "period" => nil,
67
112
  "port" => nil,
68
- "print-reply [header|body" => nil,
69
- "print-request [header|body" => nil,
113
+ "print-reply" => nil,
114
+ "print-request" => nil,
70
115
  "rate" => nil,
71
116
  "recv-buffer" => nil,
72
117
  "retry-on-failure" => nil,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httperfrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &16582700 !ruby/object:Gem::Requirement
16
+ requirement: &13560160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *16582700
24
+ version_requirements: *13560160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: simplecov
27
- requirement: &16581880 !ruby/object:Gem::Requirement
27
+ requirement: &13559120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *16581880
35
+ version_requirements: *13559120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: yard
38
- requirement: &16580940 !ruby/object:Gem::Requirement
38
+ requirement: &13558220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *16580940
46
+ version_requirements: *13558220
47
47
  description: Simple interface for calling httperf via ruby.
48
48
  email:
49
49
  - joshua@mervine.net
@@ -69,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  segments:
71
71
  - 0
72
- hash: -1274722979085222874
72
+ hash: -759597460562503080
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements: