startup-time 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tty/which'
4
+
5
+ module StartupTime
6
+ # StartupTime::Util - app-wide helper methods
7
+ module Util
8
+ # a wrapper around +TTY::Which.which+ which allows commands to be passed as
9
+ # symbols as well as strings e.g.:
10
+ #
11
+ # which("ruby") #=> "/usr/bin/ruby"
12
+ # which(:ruby) #=> "/usr/bin/ruby"
13
+ def which(command)
14
+ TTY::Which.which(command.to_s)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module StartupTime
4
+ VERSION = '1.0.0'
5
+ end
@@ -0,0 +1,5 @@
1
+ public class HelloJava {
2
+ public static void main(String[] args) {
3
+ System.out.println("Hello, world!");
4
+ }
5
+ }
@@ -0,0 +1,3 @@
1
+ fun main (args: Array<String>) {
2
+ println("Hello, world!")
3
+ }
@@ -0,0 +1,3 @@
1
+ object HelloScala extends App {
2
+ println("Hello, world!")
3
+ }
@@ -0,0 +1 @@
1
+ echo 'Hello, world!'
@@ -0,0 +1,5 @@
1
+ #include <stdio.h>
2
+
3
+ int main(int argc, char * argv[]) {
4
+ printf("Hello, world!\n");
5
+ }
@@ -0,0 +1,7 @@
1
+ #include <iostream>
2
+
3
+ int main()
4
+ {
5
+ std::cout << "Hello, world!" << std::endl;
6
+ return 0;
7
+ }
@@ -0,0 +1 @@
1
+ puts "Hello, world!"
@@ -0,0 +1,5 @@
1
+ import std.stdio;
2
+
3
+ void main () {
4
+ writeln("Hello, world!");
5
+ }
@@ -0,0 +1,7 @@
1
+ package main
2
+
3
+ import "fmt"
4
+
5
+ func main() {
6
+ fmt.Println("Hello, world!")
7
+ }
@@ -0,0 +1 @@
1
+ main = putStrLn "Hello, world!"
@@ -0,0 +1 @@
1
+ console.log("Hello, world!");
@@ -0,0 +1 @@
1
+ print('Hello, world!')
@@ -0,0 +1 @@
1
+ echo "Hello, world!"
@@ -0,0 +1 @@
1
+ say 'Hello, world!';
@@ -0,0 +1 @@
1
+ print "Hello, world!$/";
@@ -0,0 +1 @@
1
+ print("Hello, world!")
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ puts 'Hello, world!'
@@ -0,0 +1,3 @@
1
+ fn main() {
2
+ println!("Hello, world!");
3
+ }
@@ -0,0 +1,286 @@
1
+ ---
2
+ # anything < 10ms on my system is arbitrarily tagged :fast
3
+ # anything > 50ms on my system is arbitrarily tagged :slow
4
+
5
+ bash:
6
+ name: Bash
7
+ groups:
8
+ - fast
9
+ - script
10
+ command:
11
+ - bash
12
+ - hello.bash
13
+
14
+ crystal:
15
+ name: Crystal
16
+ groups:
17
+ - compiled
18
+ - fast
19
+ - native
20
+ source: hello.cr
21
+ compile: '%{compiler} build --release -o %{target} %{source}'
22
+ command: hello.cr.out
23
+ env:
24
+ CRYSTAL_CACHE_DIR: .crystal
25
+
26
+ deno:
27
+ name: JavaScript (Deno)
28
+ groups:
29
+ - js
30
+ - script
31
+ command:
32
+ - deno
33
+ - hello.js
34
+
35
+ dmd:
36
+ name: D (DMD)
37
+ groups:
38
+ - compiled
39
+ - d
40
+ - fast
41
+ - native
42
+ source: hello.d
43
+ compile: '%{compiler} -O3 -o %{target} %{source}'
44
+ command: hello.dmd.d.out
45
+
46
+ g++:
47
+ name: C++ (g++)
48
+ groups:
49
+ - c++
50
+ - compiled
51
+ - cpp
52
+ - fast
53
+ - native
54
+ source: hello.cpp
55
+ compile: '%{compiler} -O3 -o %{target} %{source}'
56
+ command: hello.gpp.out
57
+
58
+ gcc:
59
+ name: C (gcc)
60
+ groups:
61
+ - c
62
+ - compiled
63
+ - fast
64
+ - native
65
+ - no-ci # XXX flaky on Travis
66
+ source: hello.c
67
+ compile: '%{compiler} -O3 -o %{target} %{source}'
68
+ command: hello.gcc.out
69
+
70
+ gdc:
71
+ name: D (GDC)
72
+ groups:
73
+ - compiled
74
+ - d
75
+ - fast
76
+ - native
77
+ source: hello.d
78
+ compile: '%{compiler} -O3 -o %{target} %{source}'
79
+ command: hello.gdc.d.out
80
+
81
+ ghc:
82
+ name: Haskell (GHC)
83
+ groups:
84
+ - compiled
85
+ - fast
86
+ - haskell
87
+ - native
88
+ source: hello.hs
89
+ compile: '%{compiler} -v0 -O2 -outputdir .ghc -o %{target} %{source}'
90
+ command: hello.hs.out
91
+
92
+ go:
93
+ name: Go
94
+ groups:
95
+ - compiled
96
+ - fast
97
+ - native
98
+ source: hello.go
99
+ compile: '%{compiler} build -o %{target} %{source}'
100
+ command: hello.go.out
101
+
102
+ graalvm-js:
103
+ name: JavaScript (GraalVM)
104
+ groups:
105
+ - js
106
+ - script
107
+ command:
108
+ - js
109
+ - hello.js
110
+
111
+ javac:
112
+ name: Java
113
+ groups:
114
+ - compiled
115
+ - java
116
+ - jvm
117
+ source: HelloJava.java
118
+ command:
119
+ - java
120
+ - HelloJava
121
+
122
+ java-native:
123
+ name: Java Native (GraalVM)
124
+ groups:
125
+ - compiled
126
+ - fast
127
+ - java
128
+ - native
129
+ - slow-compile
130
+ compiler: native-image
131
+ source: HelloJava.class
132
+ command: hello.java.out
133
+
134
+ kotlinc-native:
135
+ name: Kotlin Native
136
+ groups:
137
+ - compiled
138
+ - fast
139
+ - kotlin
140
+ - native
141
+ - slow-compile
142
+ source: HelloKotlin.kt
143
+ command: hello.kt.out
144
+
145
+ kotlinc:
146
+ name: Kotlin
147
+ groups:
148
+ - compiled
149
+ - jvm
150
+ - kotlin
151
+ - slow
152
+ source: HelloKotlin.kt
153
+ target: HelloKotlinKt.class
154
+ compile: '%{compiler} %{source}'
155
+ command:
156
+ - kotlin
157
+ - HelloKotlinKt
158
+
159
+ ldc:
160
+ name: D (LDC)
161
+ groups:
162
+ - compiled
163
+ - d
164
+ - fast
165
+ - native
166
+ source: hello.d
167
+ compile: '%{compiler} -O3 -o %{target} %{source}'
168
+ command: hello.ldc.d.out
169
+
170
+ lua:
171
+ name: Lua
172
+ groups:
173
+ - fast
174
+ - luas
175
+ - script
176
+ command:
177
+ - lua
178
+ - hello.lua
179
+
180
+ luajit:
181
+ name: LuaJIT
182
+ groups:
183
+ - fast
184
+ - luas
185
+ - script
186
+ command:
187
+ - luajit
188
+ - hello.lua
189
+
190
+ nim:
191
+ name: Nim
192
+ groups:
193
+ - compiled
194
+ - fast
195
+ - native
196
+ source: hello.nim
197
+ compile: '%{compiler} compile --out:%{target} --opt:speed --verbosity:0 --hints:off %{source}'
198
+ command: hello.nim.out
199
+
200
+ node:
201
+ name: JavaScript (Node.js)
202
+ groups:
203
+ - js
204
+ - script
205
+ command:
206
+ - node
207
+ - hello.js
208
+
209
+ perl5:
210
+ name: Perl
211
+ groups:
212
+ - fast
213
+ - perl
214
+ - script
215
+ command:
216
+ - perl
217
+ - hello.pl
218
+
219
+ perl6:
220
+ name: Perl 6
221
+ groups:
222
+ - perl
223
+ - script
224
+ command:
225
+ - perl6
226
+ - hello.p6
227
+
228
+ python2:
229
+ name: Python 2
230
+ groups:
231
+ - python
232
+ - script
233
+ command:
234
+ - python2
235
+ - hello.py
236
+
237
+ python3:
238
+ name: Python 3
239
+ groups:
240
+ - python
241
+ - script
242
+ command:
243
+ - python3
244
+ - hello.py
245
+
246
+ ruby:
247
+ name: Ruby
248
+ groups:
249
+ - rubies
250
+ - script
251
+ command:
252
+ - ruby
253
+ - hello.rb
254
+
255
+ rustc:
256
+ name: Rust
257
+ groups:
258
+ - compiled
259
+ - fast
260
+ - native
261
+ source: hello.rs
262
+ compile: '%{compiler} -O -o %{target} %{source}'
263
+ command: hello.rs.out
264
+
265
+ scalac:
266
+ name: Scala
267
+ groups:
268
+ - compiled
269
+ - jvm
270
+ - slow
271
+ - slowest
272
+ source: HelloScala.scala
273
+ compile: '%{compiler} %{source}'
274
+ command:
275
+ - scala
276
+ - HelloScala
277
+
278
+ truffle-ruby:
279
+ name: Ruby (TruffleRuby)
280
+ groups:
281
+ - no-test # doesn't work inside bundler
282
+ - rubies
283
+ - script
284
+ command:
285
+ - truffleruby
286
+ - hello.rb
metadata ADDED
@@ -0,0 +1,219 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: startup-time
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - chocolateboy
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-02-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cli-pasta
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: env_paths
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.0.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: komenda
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.1.8
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.1.8
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '12.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '12.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tty-table
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.10.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.10.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: tty-which
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.4.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.4.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: wireless
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.0.2
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.0.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: bundler
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.65.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.65.0
153
+ description: A benchmarking tool which tests how long it takes to execute "Hello,
154
+ world!" programs in various languages.
155
+ email: chocolate@cpan.org
156
+ executables:
157
+ - startup-time
158
+ extensions: []
159
+ extra_rdoc_files: []
160
+ files:
161
+ - CHANGELOG.md
162
+ - LICENSE.md
163
+ - README.md
164
+ - bin/startup-time
165
+ - lib/startup_time.rb
166
+ - lib/startup_time/app.rb
167
+ - lib/startup_time/builder.rb
168
+ - lib/startup_time/options.rb
169
+ - lib/startup_time/registry.rb
170
+ - lib/startup_time/services.rb
171
+ - lib/startup_time/util.rb
172
+ - lib/startup_time/version.rb
173
+ - resources/src/HelloJava.java
174
+ - resources/src/HelloKotlin.kt
175
+ - resources/src/HelloScala.scala
176
+ - resources/src/hello.bash
177
+ - resources/src/hello.c
178
+ - resources/src/hello.cpp
179
+ - resources/src/hello.cr
180
+ - resources/src/hello.d
181
+ - resources/src/hello.go
182
+ - resources/src/hello.hs
183
+ - resources/src/hello.js
184
+ - resources/src/hello.lua
185
+ - resources/src/hello.nim
186
+ - resources/src/hello.p6
187
+ - resources/src/hello.pl
188
+ - resources/src/hello.py
189
+ - resources/src/hello.rb
190
+ - resources/src/hello.rs
191
+ - resources/tests.yaml
192
+ homepage: https://github.com/chocolateboy/startup-time
193
+ licenses:
194
+ - Artistic-2.0
195
+ metadata:
196
+ allowed_push_host: https://rubygems.org
197
+ bug_tracker_uri: https://github.com/chocolateboy/startup-time/issues
198
+ changelog_uri: https://github.com/chocolateboy/startup-time/blob/master/CHANGELOG.md
199
+ source_code_uri: https://github.com/chocolateboy/startup-time
200
+ post_install_message:
201
+ rdoc_options: []
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: 2.3.0
209
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ requirements: []
215
+ rubygems_version: 3.0.2
216
+ signing_key:
217
+ specification_version: 4
218
+ summary: A command-line tool to measure the startup times of programs in various languages
219
+ test_files: []