rails_api_benchmark 0.2.3 → 0.2.4

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: 11d43775977eaa602c80e9a4fe751dae26a0ba14
4
- data.tar.gz: d134a38f1b2daaac6c8b2014cc2f50b81c93edab
3
+ metadata.gz: debbd4806d82f8d2145675915911c361ccf669fb
4
+ data.tar.gz: f87681bde48304c52202243cd4257518fd69a6bf
5
5
  SHA512:
6
- metadata.gz: 742f151da69b6eee0a0c93357dbccb4af28b03e770c2645685ca10852e15a635fc096f1e1f7b0b605e25382c54806d553c9bf954ed1d87e9964a4840b4bb59b3
7
- data.tar.gz: 5b4dd39b9977699cbb638f912debf6f89281e7c26a8275f83eb9c29f28bc69e3401820942912b2934a6c1a6a8fe7b13ee3db87068503922ce907f991b344b95c
6
+ metadata.gz: 791aa3dc5ecc066e067e541922f3548319e75fcb8c5a7a45e3c6963078c4e1fceeff8f855a229d541d7cf4843d959e6d39898df78f9b2eedd87afb7209ecce81
7
+ data.tar.gz: c130cf8e1c82cec5f7a788b5699f31b4a5e24cf820d1da487e42efc9c611a4a32ab819b0105a4a13a2cf23acef956f08c293d6929c21431b9d83fa43c36010e9
data/README.md CHANGED
@@ -101,6 +101,17 @@ You can now run:
101
101
  rails api:benchmark
102
102
  ```
103
103
 
104
+ ## Screenshots
105
+
106
+ ### The README is the benchmark index, the page you’ll see in benchmark/ folder. It lists all the routes configured to be benchmarked:
107
+ ![Benchmark Index](http://imgur.com/S05CSs3.png)
108
+
109
+ ### Results are listed in a summary table to allow fast-spotting of slowdowns:
110
+ ![Benchmark Summary](http://imgur.com/le1ULaB.png)
111
+
112
+ ### Result page for a single route with gnuplot:
113
+ ![Benchmark Results](http://imgur.com/z3RcSwO.png)
114
+
104
115
  ## Contributing
105
116
  Contributions are welcome
106
117
 
@@ -108,7 +119,6 @@ Contributions are welcome
108
119
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
109
120
 
110
121
  ### TODO
111
- * Summary file (.md), to show response time for each endpoint and compare with others to track the slowest
112
122
  * POST requests handling
113
123
  * Add simplecov to permit controller coverage for example
114
124
  * Document configuration template file
@@ -11,7 +11,7 @@ module RailsApiBenchmark
11
11
  end
12
12
 
13
13
  def run
14
- gnuplotscript = File.expand_path('../../../gnuplotscript', __FILE__)
14
+ gnuplotscript = File.expand_path('../../gnuplotscript', __dir__)
15
15
  `gnuplot -e "plot_title='Benchmark #{@target.title}'; plot_file='#{@target.name}_plot.jpg'" #{gnuplotscript}`
16
16
  end
17
17
 
@@ -1,3 +1,3 @@
1
1
  module RailsApiBenchmark
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
@@ -5,7 +5,7 @@ module RailsApiBenchmark
5
5
  class View
6
6
  def initialize(*_args)
7
7
  @config = RailsApiBenchmark.config
8
- @template_path = File.expand_path('../../templates', __FILE__)
8
+ @template_path = File.expand_path('../templates', __dir__)
9
9
  end
10
10
 
11
11
  # Override this method in your view
metadata CHANGED
@@ -1,43 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_benchmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry Raimondo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
11
+ date: 2018-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: erubis
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.2
19
+ version: '2.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.2
26
+ version: '2.7'
27
27
  - !ruby/object:Gem::Dependency
28
- name: erubis
28
+ name: mustache
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
31
48
  - - ">="
32
49
  - !ruby/object:Gem::Version
33
- version: '0'
50
+ version: '5.0'
34
51
  type: :runtime
35
52
  prerelease: false
36
53
  version_requirements: !ruby/object:Gem::Requirement
37
54
  requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '5.0'
38
58
  - - ">="
39
59
  - !ruby/object:Gem::Version
40
- version: '0'
60
+ version: '5.0'
41
61
  description: Benchmark your API endpoints and get the results fast ! This gem leverages
42
62
  the power of ApacheBench, but can be configured with another benchmark tool
43
63
  email:
@@ -90,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
110
  version: '0'
91
111
  requirements: []
92
112
  rubyforge_project:
93
- rubygems_version: 2.6.12
113
+ rubygems_version: 2.6.14
94
114
  signing_key:
95
115
  specification_version: 4
96
116
  summary: RailsApiBenchmark is a benchmark tool for your Rails API