benchmark_toys 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '029d3a74f3d11f331598eed9d63e1658accaa4c6561a89af7566184fe2203860'
4
+ data.tar.gz: f39d2116073e9f88eb07a913fc9be51f462f85259724bb4427fe7e6d9f830843
5
+ SHA512:
6
+ metadata.gz: 48164d7b83c97fed29228ed0c5d7222c986d0b2c74caf7dd18aa1ae2adf273ca35616598393dde13814e15e24b5b7d3e18a53969ae2635bd371c37698cf1e153
7
+ data.tar.gz: 17eeaae4f800885e2c2c5d5123ea91920f6a1811399155194cfefd396c06060db06c69b2fbeaffad645f9dafce18219e717cdade05d541ff2ae3e87a08903206
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## master (unreleased)
4
+
5
+ ## 0.1.0 (2020-07-10)
6
+
7
+ * Initial release.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Alexander Popov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,60 @@
1
+ # Benchmark Toys
2
+
3
+ [![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/benchmark_toys?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/benchmark_toys)
4
+ [![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/benchmark_toys/master.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/benchmark_toys)
5
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/benchmark_toys.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/benchmark_toys)
6
+ [![Depfu](https://img.shields.io/depfu/AlexWayfer/benchmark_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/benchmark_toys)
7
+ [![Inline docs](https://inch-ci.org/github/AlexWayfer/benchmark_toys.svg?branch=master)](https://inch-ci.org/github/AlexWayfer/benchmark_toys)
8
+ [![license](https://img.shields.io/github/license/AlexWayfer/benchmark_toys.svg?style=flat-square)](https://github.com/AlexWayfer/benchmark_toys/blob/master/LICENSE)
9
+ [![Gem](https://img.shields.io/gem/v/benchmark_toys.svg?style=flat-square)](https://rubygems.org/gems/benchmark_toys)
10
+
11
+ Toys template for benchmarks.
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ```ruby
18
+ gem 'benchmark_toys'
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ ```shell
24
+ bundle install
25
+ ```
26
+
27
+ Or install it yourself as:
28
+
29
+ ```shell
30
+ gem install benchmark_toys
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ```ruby
36
+ require 'benchmark_toys'
37
+ expand BenchmarkToys::Template
38
+ # `bench` alias is built-in, but you can add additional aliases:
39
+ alias_tool :b, :benchmark
40
+ ```
41
+
42
+ ## Development
43
+
44
+ After checking out the repo, run `bundle install` to install dependencies.
45
+
46
+ Then, run `toys rspec` to run the tests.
47
+
48
+ To install this gem onto your local machine, run `toys gem install`.
49
+
50
+ To release a new version, run `toys gem release %version%`.
51
+ See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
52
+
53
+ ## Contributing
54
+
55
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/benchmark_toys).
56
+
57
+ ## License
58
+
59
+ The gem is available as open source under the terms of the
60
+ [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'benchmark_toys/template'
4
+ require_relative 'benchmark_toys/version'
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'toys-core'
4
+
5
+ module BenchmarkToys
6
+ ## Define toys for benchmark
7
+ class Template
8
+ include Toys::Template
9
+
10
+ on_expand do
11
+ tool :benchmark do
12
+ include :exec, exit_on_nonzero_status: true
13
+
14
+ desc 'Benchmark code'
15
+
16
+ def run
17
+ require 'example_file'
18
+
19
+ ExampleFile.new("#{context_directory}/benchmark/main.example.rb")
20
+ .actualize_regular_file
21
+
22
+ sh 'ruby benchmark/main.rb'
23
+ end
24
+ end
25
+
26
+ alias_tool :bench, :benchmark
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BenchmarkToys
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,250 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: benchmark_toys
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Popov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: benchmark-ips
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: benchmark-memory
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.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: 0.1.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: example_file
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: toys-core
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.10.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.10.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry-byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: gem_toys
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.2.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.2.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: toys
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.10.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.10.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: codecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.1.20
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.1.20
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.9'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.9'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 0.18.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 0.18.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.87.0
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 0.87.0
181
+ - !ruby/object:Gem::Dependency
182
+ name: rubocop-performance
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '1.0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: rubocop-rspec
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '1.0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '1.0'
209
+ description: 'Toys template for benchmarks.
210
+
211
+ '
212
+ email:
213
+ - alex.wayfer@gmail.com
214
+ executables: []
215
+ extensions: []
216
+ extra_rdoc_files: []
217
+ files:
218
+ - CHANGELOG.md
219
+ - LICENSE.txt
220
+ - README.md
221
+ - lib/benchmark_toys.rb
222
+ - lib/benchmark_toys/template.rb
223
+ - lib/benchmark_toys/version.rb
224
+ homepage: https://github.com/AlexWayfer/benchmark_toys
225
+ licenses:
226
+ - MIT
227
+ metadata:
228
+ source_code_uri: https://github.com/AlexWayfer/benchmark_toys
229
+ homepage_uri: https://github.com/AlexWayfer/benchmark_toys
230
+ changelog_uri: https://github.com/AlexWayfer/benchmark_toys/blob/master/CHANGELOG.md
231
+ post_install_message:
232
+ rdoc_options: []
233
+ require_paths:
234
+ - lib
235
+ required_ruby_version: !ruby/object:Gem::Requirement
236
+ requirements:
237
+ - - ">="
238
+ - !ruby/object:Gem::Version
239
+ version: '2.5'
240
+ required_rubygems_version: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ requirements: []
246
+ rubygems_version: 3.1.2
247
+ signing_key:
248
+ specification_version: 4
249
+ summary: Toys template for benchmarks.
250
+ test_files: []