httperfrb 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +0 -1
- data/README.md +204 -1
- data/lib/httperf.rb +1 -1
- data/lib/httperf/version.rb +1 -1
- metadata +19 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6b705e7247c6744494b65c15825a3ac1327e8851
|
4
|
+
data.tar.gz: 8919ba451a401f501fafec0507b6c6d7c6fbcf5d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f7024b403d7cccf306542812ce63b64a5bdbd35bceec29b0aa7e88d3aeb125389c05c64fb8a14d42798fdfc5d2b91da378662673035aa83fcc17e1d2ab56ca40
|
7
|
+
data.tar.gz: dd259a990b807a93814242abdc43c8f38d324ed19bfb7871d1be1ff5a9e6fa6d64727e1a2b443fb0b19002a22cb8f21282360bd352dd5433fa1f7869538aa7a4
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1 +1,204 @@
|
|
1
|
-
|
1
|
+
# HTTPerf.rb
|
2
|
+
|
3
|
+
![Gem Version](https://badge.fury.io/rb/httperfrb.png) ![Build Status](https://travis-ci.org/jmervine/httperfrb.png?branch=master)
|
4
|
+
|
5
|
+
Simple Ruby interface for httperf.
|
6
|
+
|
7
|
+
## Installing 'httperf'
|
8
|
+
|
9
|
+
Requires [httperf](http://mervine.net/httperf), of course...
|
10
|
+
|
11
|
+
#### Mac
|
12
|
+
|
13
|
+
:::shell
|
14
|
+
sudo port install httperf
|
15
|
+
|
16
|
+
#### Debian / Ubuntu
|
17
|
+
|
18
|
+
:::shell
|
19
|
+
sudo apt-get install httperf
|
20
|
+
|
21
|
+
#### Redhat / CentOS
|
22
|
+
|
23
|
+
:::shell
|
24
|
+
sudo yum install httperf
|
25
|
+
|
26
|
+
#### My 'httperf'
|
27
|
+
|
28
|
+
See: [httperf-0.9.1 with individual connection times](http://mervine.net/httperf-0-9-1-with-individual-connection-times).
|
29
|
+
|
30
|
+
## Install
|
31
|
+
|
32
|
+
:::shell
|
33
|
+
gem install httperfrb
|
34
|
+
|
35
|
+
## Usage - HTTPerf
|
36
|
+
|
37
|
+
Some basic usage examples.
|
38
|
+
|
39
|
+
:::ruby
|
40
|
+
require 'httperf'
|
41
|
+
perf = HTTPerf.new( "server" => "host", "port" => 8080, "uri" => "/foo" )
|
42
|
+
puts perf.run
|
43
|
+
|
44
|
+
perf.update_option("uri", "/foo/bar")
|
45
|
+
thread = perf.fork
|
46
|
+
while((thread.alive?))
|
47
|
+
sleep 0.01
|
48
|
+
print "#"
|
49
|
+
end
|
50
|
+
unless perf.fork_err.nil?
|
51
|
+
puts perf.fork_out
|
52
|
+
end
|
53
|
+
|
54
|
+
### Teeing output
|
55
|
+
|
56
|
+
Added in 0.3.10.
|
57
|
+
|
58
|
+
> Adding the `tee` param will print httperf output while running the process.
|
59
|
+
|
60
|
+
:::ruby
|
61
|
+
require 'httperf'
|
62
|
+
perf = HTTPerf.new( "server" => "host", "port" => 8080, "uri" => "/foo", "tee" => true )
|
63
|
+
output = perf.run
|
64
|
+
|
65
|
+
### With HTTPerf::Parser
|
66
|
+
|
67
|
+
:::ruby
|
68
|
+
require 'httperf'
|
69
|
+
perf = HTTPerf.new( "server" => "host", "port" => 8080, "uri" => "/foo" )
|
70
|
+
puts perf.parse = true
|
71
|
+
puts perf.run
|
72
|
+
|
73
|
+
# or directly
|
74
|
+
|
75
|
+
puts HTTPerf::Parser.parse( HTTPerf.new( "server" => "host", "port" => 8080, "uri" => "/foo" ).run )
|
76
|
+
|
77
|
+
## Useage - HTTPerf::Parser
|
78
|
+
|
79
|
+
:::ruby
|
80
|
+
require 'httperf/parser'
|
81
|
+
|
82
|
+
# read result from a file, for example
|
83
|
+
puts HTTPerf::Parser.parse( File.open("httperf.out", "r").read )
|
84
|
+
|
85
|
+
# or verbose output
|
86
|
+
puts HTTPerf::Parser.parse( File.open("httperf_verbose.out", "r").read, true )
|
87
|
+
|
88
|
+
#### From the command line:
|
89
|
+
|
90
|
+
Something I've been playing around with, it's more of hack really. But it works well for seralizing output to YAML or JSON:
|
91
|
+
|
92
|
+
##### To JSON file:
|
93
|
+
|
94
|
+
:::shell
|
95
|
+
httperf --num-conns=10 --verbose | ruby -e 'require "httperf/parser"; require "json"; puts HTTPerf::Parser.parse(ARGF.read).to_json' > httperf.json
|
96
|
+
|
97
|
+
##### To YAML file:
|
98
|
+
|
99
|
+
:::shell
|
100
|
+
httperf --num-conns=10 --verbose | ruby -e 'require "httperf/parser"; require "yaml"; puts HTTPerf::Parser.parse(ARGF.read).to_yaml' > httperf.yml
|
101
|
+
|
102
|
+
#### Parser Keys:
|
103
|
+
|
104
|
+
:::ruby
|
105
|
+
:command
|
106
|
+
:max_connect_burst_length
|
107
|
+
:total_connections
|
108
|
+
:total_requests
|
109
|
+
:total_replies
|
110
|
+
:total_test_duration
|
111
|
+
:connection_rate_per_sec
|
112
|
+
:connection_rate_ms_conn
|
113
|
+
:connection_time_min
|
114
|
+
:connection_time_avg
|
115
|
+
:connection_time_max
|
116
|
+
:connection_time_median
|
117
|
+
:connection_time_stddev
|
118
|
+
:connection_time_connect
|
119
|
+
:connection_length
|
120
|
+
:request_rate_per_sec
|
121
|
+
:request_rate_ms_request
|
122
|
+
:request_size
|
123
|
+
:reply_rate_min
|
124
|
+
:reply_rate_avg
|
125
|
+
:reply_rate_max
|
126
|
+
:reply_rate_stddev
|
127
|
+
:reply_rate_samples
|
128
|
+
:reply_time_response
|
129
|
+
:reply_time_transfer
|
130
|
+
:reply_size_header
|
131
|
+
:reply_size_content
|
132
|
+
:reply_size_footer
|
133
|
+
:reply_size_total
|
134
|
+
:reply_status_1xx
|
135
|
+
:reply_status_2xx
|
136
|
+
:reply_status_3xx
|
137
|
+
:reply_status_4xx
|
138
|
+
:reply_status_5xx
|
139
|
+
:cpu_time_user_sec
|
140
|
+
:cpu_time_system_sec
|
141
|
+
:cpu_time_user_pct
|
142
|
+
:cpu_time_system_pct
|
143
|
+
:cpu_time_total_pct
|
144
|
+
:net_io_kb_sec
|
145
|
+
:net_io_bps
|
146
|
+
:errors_total
|
147
|
+
:errors_client_timeout
|
148
|
+
:errors_socket_timeout
|
149
|
+
:errors_conn_refused
|
150
|
+
:errors_conn_reset
|
151
|
+
:errors_fd_unavail
|
152
|
+
:errors_addr_unavail
|
153
|
+
:errors_ftab_full
|
154
|
+
:errors_other
|
155
|
+
|
156
|
+
#### Verbose Percentile Parser Keys:
|
157
|
+
|
158
|
+
:connection_time_75_pct
|
159
|
+
:connection_time_80_pct
|
160
|
+
:connection_time_85_pct
|
161
|
+
:connection_time_90_pct
|
162
|
+
:connection_time_95_pct
|
163
|
+
:connection_time_99_pct
|
164
|
+
|
165
|
+
|
166
|
+
#### Accepted Options:
|
167
|
+
|
168
|
+
- `"add-header"`
|
169
|
+
- `"burst-length"`
|
170
|
+
- `"client"`
|
171
|
+
- `"close-with-reset"`
|
172
|
+
- `"debug"`
|
173
|
+
- `"failure-status"`
|
174
|
+
- `"hog"`
|
175
|
+
- `"http-version"`
|
176
|
+
- `"max-connections"`
|
177
|
+
- `"max-piped-calls"`
|
178
|
+
- `"method"`
|
179
|
+
- `"no-host-hdr"`
|
180
|
+
- `"num-calls"`
|
181
|
+
- `"num-conns"`
|
182
|
+
- `"period"`
|
183
|
+
- `"port"`
|
184
|
+
- `"print-reply"`
|
185
|
+
- `"print-request"`
|
186
|
+
- `"rate"`
|
187
|
+
- `"recv-buffer"`
|
188
|
+
- `"retry-on-failure"`
|
189
|
+
- `"send-buffer"`
|
190
|
+
- `"server"`
|
191
|
+
- `"server-name"`
|
192
|
+
- `"session-cookies"`
|
193
|
+
- `"ssl"`
|
194
|
+
- `"ssl-ciphers"`
|
195
|
+
- `"ssl-no-reuse"`
|
196
|
+
- `"think-timeout"`
|
197
|
+
- `"timeout"`
|
198
|
+
- `"uri"`
|
199
|
+
- `"verbose"`
|
200
|
+
- `"version"`
|
201
|
+
- `"wlog"`
|
202
|
+
- `"wsess"`
|
203
|
+
- `"wsesslog"`
|
204
|
+
- `"wset"`
|
data/lib/httperf.rb
CHANGED
data/lib/httperf/version.rb
CHANGED
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httperfrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.12
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Joshua Mervine
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-14 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: simplecov
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: yard
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: open4
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
description: Simple interface for calling httperf via ruby.
|
@@ -82,35 +73,34 @@ executables: []
|
|
82
73
|
extensions: []
|
83
74
|
extra_rdoc_files: []
|
84
75
|
files:
|
76
|
+
- Gemfile
|
77
|
+
- HISTORY.md
|
78
|
+
- README.md
|
85
79
|
- lib/httperf.rb
|
86
|
-
- lib/httperf/version.rb
|
87
80
|
- lib/httperf/parser.rb
|
88
|
-
-
|
89
|
-
- HISTORY.md
|
90
|
-
- Gemfile
|
81
|
+
- lib/httperf/version.rb
|
91
82
|
homepage: http://www.rubyops.net/gems/httperfrb
|
92
83
|
licenses: []
|
84
|
+
metadata: {}
|
93
85
|
post_install_message:
|
94
86
|
rdoc_options: []
|
95
87
|
require_paths:
|
96
88
|
- lib
|
97
89
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
90
|
requirements:
|
100
|
-
- -
|
91
|
+
- - ">="
|
101
92
|
- !ruby/object:Gem::Version
|
102
93
|
version: '0'
|
103
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
-
none: false
|
105
95
|
requirements:
|
106
|
-
- -
|
96
|
+
- - ">="
|
107
97
|
- !ruby/object:Gem::Version
|
108
98
|
version: 1.3.6
|
109
99
|
requirements: []
|
110
100
|
rubyforge_project:
|
111
|
-
rubygems_version:
|
101
|
+
rubygems_version: 2.2.0
|
112
102
|
signing_key:
|
113
|
-
specification_version:
|
103
|
+
specification_version: 4
|
114
104
|
summary: HTTPerf via Ruby
|
115
105
|
test_files: []
|
116
106
|
has_rdoc:
|