abr 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -25
- data/abr-0.1.5.gem +0 -0
- data/exe/abr +0 -0
- data/lib/abr/command.rb +2 -0
- data/lib/abr/version.rb +1 -1
- data/lib/abr.rb +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18826ccfbd3040bfdb2e7b298e33eb5284d349b7
|
4
|
+
data.tar.gz: 7713777802896a457e8967e8b7b64c1d11659c64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30b6be3adb53f468db645aa39b0c9c7caa152cbf518a4cc8125dd22899fdf870212781a40c9ff337ff4b9036da7e12cd63ded7d9dd19f0c001ae2afce13690ca
|
7
|
+
data.tar.gz: 5e1314a102f4111d6bf70056502d8ad00e9ec94b719b6e22cab13cbcfb758bc5b97038655e8adc628298109920e574fa8efa9d676e0e0db14547e9ed43f33f94
|
data/README.md
CHANGED
@@ -1,43 +1,36 @@
|
|
1
1
|
# Abr
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Abr is a gem for performance test with ab (apache bench).
|
6
4
|
|
7
5
|
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'abr'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
6
|
+
Install it yourself as:
|
20
7
|
|
21
8
|
$ gem install abr
|
22
9
|
|
23
|
-
## Usage
|
10
|
+
## Usage
|
11
|
+
Make text and write ab command into it.
|
24
12
|
|
25
|
-
|
13
|
+
input_file.txt
|
14
|
+
```$xslt
|
15
|
+
ab -n 1 -c 1 https://google.com/
|
16
|
+
```
|
26
17
|
|
27
|
-
|
18
|
+
And then, pass as an option to this abr command.
|
28
19
|
|
29
|
-
|
20
|
+
```
|
21
|
+
abr test -i=input_file.txt
|
22
|
+
```
|
30
23
|
|
31
|
-
|
24
|
+
Finally, you got a result file which name is `result.csv`.
|
32
25
|
|
33
|
-
|
26
|
+
Or, you can specify result file name using `-o` option.
|
34
27
|
|
35
|
-
|
28
|
+
|
29
|
+
```
|
30
|
+
abr test -i=input_file.txt -o=specified_result_file.csv
|
31
|
+
```
|
36
32
|
|
37
33
|
## License
|
38
34
|
|
39
35
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
36
|
|
41
|
-
## Code of Conduct
|
42
|
-
|
43
|
-
Everyone interacting in the Abr project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/abr/blob/master/CODE_OF_CONDUCT.md).
|
data/abr-0.1.5.gem
ADDED
Binary file
|
data/exe/abr
CHANGED
File without changes
|
data/lib/abr/command.rb
CHANGED
@@ -6,9 +6,11 @@ module Abr
|
|
6
6
|
desc "test -i=[input file path] -o=[output file path]", "performance tests using apache bench"
|
7
7
|
option :input_file, aliases: 'i', required: true
|
8
8
|
option :output_file, aliases: 'o'
|
9
|
+
option :interval, type: :numeric
|
9
10
|
def test
|
10
11
|
Abr.test(options)
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
16
|
+
Abr::Command.start(ARGV)
|
data/lib/abr/version.rb
CHANGED
data/lib/abr.rb
CHANGED
@@ -7,6 +7,7 @@ module Abr
|
|
7
7
|
def self.test(options)
|
8
8
|
input_file = options[:input_file]
|
9
9
|
output_file = options[:output_file] || 'ab_result.csv'
|
10
|
+
interval = options[:interval]&.to_i || 10
|
10
11
|
|
11
12
|
result = open(input_file).map do |line|
|
12
13
|
next unless line[0..1] == 'ab'
|
@@ -33,6 +34,7 @@ module Abr
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
37
|
+
sleep interval
|
36
38
|
result
|
37
39
|
end
|
38
40
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nyaahara
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- LICENSE.txt
|
112
112
|
- README.md
|
113
113
|
- Rakefile
|
114
|
+
- abr-0.1.5.gem
|
114
115
|
- abr.gemspec
|
115
116
|
- bin/console
|
116
117
|
- bin/setup
|