e621stream 0.0.0

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.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +35 -0
  4. data/lib/e621stream/client/options.rb +20 -0
  5. data/lib/e621stream/client.rb +211 -0
  6. data/lib/e621stream/close_codes.rb +23 -0
  7. data/lib/e621stream/event.rb +24 -0
  8. data/lib/e621stream/events.rb +29 -0
  9. data/lib/e621stream/stream_error.rb +18 -0
  10. data/lib/e621stream/version.rb +5 -0
  11. data/lib/e621stream.rb +18 -0
  12. data/sorbet/config +6 -0
  13. data/sorbet/rbi/annotations/.gitattributes +1 -0
  14. data/sorbet/rbi/annotations/minitest.rbi +120 -0
  15. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  16. data/sorbet/rbi/gems/.gitattributes +1 -0
  17. data/sorbet/rbi/gems/ast@2.4.3.rbi +550 -0
  18. data/sorbet/rbi/gems/async-http@0.105.0.rbi +1649 -0
  19. data/sorbet/rbi/gems/async-pool@0.12.0.rbi +219 -0
  20. data/sorbet/rbi/gems/async-websocket@0.30.2.rbi +271 -0
  21. data/sorbet/rbi/gems/async@2.46.0.rbi +2193 -0
  22. data/sorbet/rbi/gems/benchmark@0.5.0.rbi +495 -0
  23. data/sorbet/rbi/gems/console@1.38.0.rbi +1552 -0
  24. data/sorbet/rbi/gems/erb@6.0.7.rbi +1581 -0
  25. data/sorbet/rbi/gems/erubi@1.13.1.rbi +153 -0
  26. data/sorbet/rbi/gems/fiber-annotation@0.2.0.rbi +62 -0
  27. data/sorbet/rbi/gems/fiber-local@1.1.0.rbi +36 -0
  28. data/sorbet/rbi/gems/fiber-storage@1.0.1.rbi +43 -0
  29. data/sorbet/rbi/gems/io-console@0.9.5.rbi +9 -0
  30. data/sorbet/rbi/gems/io-endpoint@0.19.0.rbi +1079 -0
  31. data/sorbet/rbi/gems/io-event@1.22.3.rbi +971 -0
  32. data/sorbet/rbi/gems/io-stream@0.14.0.rbi +805 -0
  33. data/sorbet/rbi/gems/json@3.1.0.rbi +1929 -0
  34. data/sorbet/rbi/gems/language_server-protocol@3.17.0.6.rbi +9 -0
  35. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
  36. data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
  37. data/sorbet/rbi/gems/minitest@5.27.0.rbi +1499 -0
  38. data/sorbet/rbi/gems/netrc@0.11.0.rbi +147 -0
  39. data/sorbet/rbi/gems/openssl@4.0.2.rbi +4366 -0
  40. data/sorbet/rbi/gems/parallel@2.3.0.rbi +332 -0
  41. data/sorbet/rbi/gems/parser@3.3.13.0.rbi +5146 -0
  42. data/sorbet/rbi/gems/pp@0.6.4.rbi +373 -0
  43. data/sorbet/rbi/gems/prettyprint@0.2.1.rbi +476 -0
  44. data/sorbet/rbi/gems/prism@1.9.0.rbi +42213 -0
  45. data/sorbet/rbi/gems/protocol-hpack@1.5.1.rbi +418 -0
  46. data/sorbet/rbi/gems/protocol-http1@0.41.1.rbi +894 -0
  47. data/sorbet/rbi/gems/protocol-http2@0.29.2.rbi +2277 -0
  48. data/sorbet/rbi/gems/protocol-http@0.72.1.rbi +3801 -0
  49. data/sorbet/rbi/gems/protocol-rack@0.23.0.rbi +9 -0
  50. data/sorbet/rbi/gems/protocol-url@0.19.0.rbi +9 -0
  51. data/sorbet/rbi/gems/protocol-websocket@0.21.3.rbi +1087 -0
  52. data/sorbet/rbi/gems/racc@1.8.1.rbi +169 -0
  53. data/sorbet/rbi/gems/rack@3.2.8.rbi +9 -0
  54. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +362 -0
  55. data/sorbet/rbi/gems/rake@13.4.2.rbi +3127 -0
  56. data/sorbet/rbi/gems/rbi@0.5.0.rbi +5875 -0
  57. data/sorbet/rbi/gems/rbs@4.2.0.rbi +7133 -0
  58. data/sorbet/rbi/gems/rdoc@8.1.0.rbi +9 -0
  59. data/sorbet/rbi/gems/regexp_parser@2.13.1.rbi +3500 -0
  60. data/sorbet/rbi/gems/reline@0.7.0.rbi +2449 -0
  61. data/sorbet/rbi/gems/require-hooks@0.5.1.rbi +152 -0
  62. data/sorbet/rbi/gems/rexml@3.4.4.rbi +4905 -0
  63. data/sorbet/rbi/gems/rubocop-ast@1.51.0.rbi +7230 -0
  64. data/sorbet/rbi/gems/rubocop-rake@0.7.1.rbi +314 -0
  65. data/sorbet/rbi/gems/rubocop@1.92.2.rbi +69094 -0
  66. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  67. data/sorbet/rbi/gems/rubydex@0.4.4.rbi +1620 -0
  68. data/sorbet/rbi/gems/spoom@1.8.13.rbi +7380 -0
  69. data/sorbet/rbi/gems/tapioca@0.20.0.rbi +3752 -0
  70. data/sorbet/rbi/gems/thor@1.5.0.rbi +3870 -0
  71. data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
  72. data/sorbet/rbi/gems/unicode-display_width@3.3.0.rbi +130 -0
  73. data/sorbet/rbi/gems/unicode-emoji@4.3.0.rbi +254 -0
  74. data/sorbet/rbi/gems/zeitwerk@2.8.3.rbi +1178 -0
  75. data/sorbet/tapioca/config.yml +13 -0
  76. data/sorbet/tapioca/require.rb +4 -0
  77. metadata +175 -0
@@ -0,0 +1,495 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `benchmark` gem.
5
+ # Please instead update this file by running `bin/tapioca gem benchmark`.
6
+
7
+
8
+ # The Benchmark module provides methods to measure and report the time
9
+ # used to execute Ruby code.
10
+ #
11
+ # * Measure the time to construct the string given by the expression
12
+ # <code>"a"*1_000_000_000</code>:
13
+ #
14
+ # require 'benchmark'
15
+ #
16
+ # puts Benchmark.measure { "a"*1_000_000_000 }
17
+ #
18
+ # On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
19
+ #
20
+ # 0.350000 0.400000 0.750000 ( 0.835234)
21
+ #
22
+ # This report shows the user CPU time, system CPU time, the total time
23
+ # (sum of user CPU time, system CPU time, children's user CPU time,
24
+ # and children's system CPU time), and the elapsed real time. The unit
25
+ # of time is seconds.
26
+ #
27
+ # * Do some experiments sequentially using the #bm method:
28
+ #
29
+ # require 'benchmark'
30
+ #
31
+ # n = 5000000
32
+ # Benchmark.bm do |x|
33
+ # x.report { for i in 1..n; a = "1"; end }
34
+ # x.report { n.times do ; a = "1"; end }
35
+ # x.report { 1.upto(n) do ; a = "1"; end }
36
+ # end
37
+ #
38
+ # The result:
39
+ #
40
+ # user system total real
41
+ # 1.010000 0.000000 1.010000 ( 1.014479)
42
+ # 1.000000 0.000000 1.000000 ( 0.998261)
43
+ # 0.980000 0.000000 0.980000 ( 0.981335)
44
+ #
45
+ # * Continuing the previous example, put a label in each report:
46
+ #
47
+ # require 'benchmark'
48
+ #
49
+ # n = 5000000
50
+ # Benchmark.bm(7) do |x|
51
+ # x.report("for:") { for i in 1..n; a = "1"; end }
52
+ # x.report("times:") { n.times do ; a = "1"; end }
53
+ # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
54
+ # end
55
+ #
56
+ # The result:
57
+ #
58
+ # user system total real
59
+ # for: 1.010000 0.000000 1.010000 ( 1.015688)
60
+ # times: 1.000000 0.000000 1.000000 ( 1.003611)
61
+ # upto: 1.030000 0.000000 1.030000 ( 1.028098)
62
+ #
63
+ # * The times for some benchmarks depend on the order in which items
64
+ # are run. These differences are due to the cost of memory
65
+ # allocation and garbage collection. To avoid these discrepancies,
66
+ # the #bmbm method is provided. For example, to compare ways to
67
+ # sort an array of floats:
68
+ #
69
+ # require 'benchmark'
70
+ #
71
+ # array = (1..1000000).map { rand }
72
+ #
73
+ # Benchmark.bmbm do |x|
74
+ # x.report("sort!") { array.dup.sort! }
75
+ # x.report("sort") { array.dup.sort }
76
+ # end
77
+ #
78
+ # The result:
79
+ #
80
+ # Rehearsal -----------------------------------------
81
+ # sort! 1.490000 0.010000 1.500000 ( 1.490520)
82
+ # sort 1.460000 0.000000 1.460000 ( 1.463025)
83
+ # -------------------------------- total: 2.960000sec
84
+ #
85
+ # user system total real
86
+ # sort! 1.460000 0.000000 1.460000 ( 1.460465)
87
+ # sort 1.450000 0.010000 1.460000 ( 1.448327)
88
+ #
89
+ # * Report statistics of sequential experiments with unique labels,
90
+ # using the #benchmark method:
91
+ #
92
+ # require 'benchmark'
93
+ # include Benchmark # we need the CAPTION and FORMAT constants
94
+ #
95
+ # n = 5000000
96
+ # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
97
+ # tf = x.report("for:") { for i in 1..n; a = "1"; end }
98
+ # tt = x.report("times:") { n.times do ; a = "1"; end }
99
+ # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
100
+ # [tf+tt+tu, (tf+tt+tu)/3]
101
+ # end
102
+ #
103
+ # The result:
104
+ #
105
+ # user system total real
106
+ # for: 0.950000 0.000000 0.950000 ( 0.952039)
107
+ # times: 0.980000 0.000000 0.980000 ( 0.984938)
108
+ # upto: 0.950000 0.000000 0.950000 ( 0.946787)
109
+ # >total: 2.880000 0.000000 2.880000 ( 2.883764)
110
+ # >avg: 0.960000 0.000000 0.960000 ( 0.961255)
111
+ #
112
+ # pkg:gem/benchmark#lib/benchmark.rb:123
113
+ module Benchmark
114
+ private
115
+
116
+ # Invokes the block with a Benchmark::Report object, which
117
+ # may be used to collect and report on the results of individual
118
+ # benchmark tests. Reserves +label_width+ leading spaces for
119
+ # labels on each line. Prints +caption+ at the top of the
120
+ # report, and uses +format+ to format each line.
121
+ # (Note: +caption+ must contain a terminating newline character,
122
+ # see the default Benchmark::Tms::CAPTION for an example.)
123
+ #
124
+ # Returns an array of Benchmark::Tms objects.
125
+ #
126
+ # If the block returns an array of
127
+ # Benchmark::Tms objects, these will be used to format
128
+ # additional lines of output. If +labels+ parameter are
129
+ # given, these are used to label these extra lines.
130
+ #
131
+ # _Note_: Other methods provide a simpler interface to this one, and are
132
+ # suitable for nearly all benchmarking requirements. See the examples in
133
+ # Benchmark, and the #bm and #bmbm methods.
134
+ #
135
+ # Example:
136
+ #
137
+ # require 'benchmark'
138
+ # include Benchmark # we need the CAPTION and FORMAT constants
139
+ #
140
+ # n = 5000000
141
+ # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
142
+ # tf = x.report("for:") { for i in 1..n; a = "1"; end }
143
+ # tt = x.report("times:") { n.times do ; a = "1"; end }
144
+ # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
145
+ # [tf+tt+tu, (tf+tt+tu)/3]
146
+ # end
147
+ #
148
+ # Generates:
149
+ #
150
+ # user system total real
151
+ # for: 0.970000 0.000000 0.970000 ( 0.970493)
152
+ # times: 0.990000 0.000000 0.990000 ( 0.989542)
153
+ # upto: 0.970000 0.000000 0.970000 ( 0.972854)
154
+ # >total: 2.930000 0.000000 2.930000 ( 2.932889)
155
+ # >avg: 0.976667 0.000000 0.976667 ( 0.977630)
156
+ #
157
+ # pkg:gem/benchmark#lib/benchmark.rb:171
158
+ def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
159
+
160
+ # A simple interface to the #benchmark method, #bm generates sequential
161
+ # reports with labels. +label_width+ and +labels+ parameters have the same
162
+ # meaning as for #benchmark.
163
+ #
164
+ # require 'benchmark'
165
+ #
166
+ # n = 5000000
167
+ # Benchmark.bm(7) do |x|
168
+ # x.report("for:") { for i in 1..n; a = "1"; end }
169
+ # x.report("times:") { n.times do ; a = "1"; end }
170
+ # x.report("upto:") { 1.upto(n) do ; a = "1"; end }
171
+ # end
172
+ #
173
+ # Generates:
174
+ #
175
+ # user system total real
176
+ # for: 0.960000 0.000000 0.960000 ( 0.957966)
177
+ # times: 0.960000 0.000000 0.960000 ( 0.960423)
178
+ # upto: 0.950000 0.000000 0.950000 ( 0.954864)
179
+ #
180
+ # pkg:gem/benchmark#lib/benchmark.rb:216
181
+ def bm(label_width = T.unsafe(nil), *labels, &blk); end
182
+
183
+ # Sometimes benchmark results are skewed because code executed
184
+ # earlier encounters different garbage collection overheads than
185
+ # that run later. #bmbm attempts to minimize this effect by running
186
+ # the tests twice, the first time as a rehearsal in order to get the
187
+ # runtime environment stable, the second time for
188
+ # real. GC.start is executed before the start of each of
189
+ # the real timings; the cost of this is not included in the
190
+ # timings. In reality, though, there's only so much that #bmbm can
191
+ # do, and the results are not guaranteed to be isolated from garbage
192
+ # collection and other effects.
193
+ #
194
+ # Because #bmbm takes two passes through the tests, it can
195
+ # calculate the required label width.
196
+ #
197
+ # require 'benchmark'
198
+ #
199
+ # array = (1..1000000).map { rand }
200
+ #
201
+ # Benchmark.bmbm do |x|
202
+ # x.report("sort!") { array.dup.sort! }
203
+ # x.report("sort") { array.dup.sort }
204
+ # end
205
+ #
206
+ # Generates:
207
+ #
208
+ # Rehearsal -----------------------------------------
209
+ # sort! 1.440000 0.010000 1.450000 ( 1.446833)
210
+ # sort 1.440000 0.000000 1.440000 ( 1.448257)
211
+ # -------------------------------- total: 2.890000sec
212
+ #
213
+ # user system total real
214
+ # sort! 1.460000 0.000000 1.460000 ( 1.458065)
215
+ # sort 1.450000 0.000000 1.450000 ( 1.455963)
216
+ #
217
+ # #bmbm yields a Benchmark::Job object and returns an array of
218
+ # Benchmark::Tms objects.
219
+ #
220
+ # pkg:gem/benchmark#lib/benchmark.rb:258
221
+ def bmbm(width = T.unsafe(nil)); end
222
+
223
+ # Returns the time used to execute the given block as a
224
+ # Benchmark::Tms object. Takes +label+ option.
225
+ #
226
+ # require 'benchmark'
227
+ #
228
+ # n = 1000000
229
+ #
230
+ # time = Benchmark.measure do
231
+ # n.times { a = "1" }
232
+ # end
233
+ # puts time
234
+ #
235
+ # Generates:
236
+ #
237
+ # 0.220000 0.000000 0.220000 ( 0.227313)
238
+ #
239
+ # pkg:gem/benchmark#lib/benchmark.rb:303
240
+ def measure(label = T.unsafe(nil)); end
241
+
242
+ # Returns the elapsed real time used to execute the given block.
243
+ # The unit of time is milliseconds.
244
+ #
245
+ # Benchmark.ms { "a" * 1_000_000_000 }
246
+ # #=> 509.8029999935534
247
+ #
248
+ # pkg:gem/benchmark#lib/benchmark.rb:335
249
+ def ms; end
250
+
251
+ # Returns the elapsed real time used to execute the given block.
252
+ # The unit of time is seconds.
253
+ #
254
+ # Benchmark.realtime { "a" * 1_000_000_000 }
255
+ # #=> 0.5098029999935534
256
+ #
257
+ # pkg:gem/benchmark#lib/benchmark.rb:322
258
+ def realtime; end
259
+
260
+ class << self
261
+ # pkg:gem/benchmark#lib/benchmark.rb:341
262
+ def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
263
+
264
+ # pkg:gem/benchmark#lib/benchmark.rb:341
265
+ def bm(label_width = T.unsafe(nil), *labels, &blk); end
266
+
267
+ # pkg:gem/benchmark#lib/benchmark.rb:341
268
+ def bmbm(width = T.unsafe(nil)); end
269
+
270
+ # pkg:gem/benchmark#lib/benchmark.rb:341
271
+ def measure(label = T.unsafe(nil)); end
272
+
273
+ # pkg:gem/benchmark#lib/benchmark.rb:341
274
+ def ms; end
275
+
276
+ # pkg:gem/benchmark#lib/benchmark.rb:341
277
+ def realtime; end
278
+ end
279
+ end
280
+
281
+ # A Job is a sequence of labelled blocks to be processed by the
282
+ # Benchmark.bmbm method. It is of little direct interest to the user.
283
+ #
284
+ # pkg:gem/benchmark#lib/benchmark.rb:347
285
+ class Benchmark::Job
286
+ # Returns an initialized Job instance.
287
+ # Usually, one doesn't call this method directly, as new
288
+ # Job objects are created by the #bmbm method.
289
+ # +width+ is a initial value for the label offset used in formatting;
290
+ # the #bmbm method passes its +width+ argument to this constructor.
291
+ #
292
+ # pkg:gem/benchmark#lib/benchmark.rb:355
293
+ def initialize(width); end
294
+
295
+ # Registers the given label and block pair in the job list.
296
+ #
297
+ # pkg:gem/benchmark#lib/benchmark.rb:363
298
+ def item(label = T.unsafe(nil), &blk); end
299
+
300
+ # An array of 2-element arrays, consisting of label and block pairs.
301
+ #
302
+ # pkg:gem/benchmark#lib/benchmark.rb:375
303
+ def list; end
304
+
305
+ # pkg:gem/benchmark#lib/benchmark.rb:372
306
+ def report(label = T.unsafe(nil), &blk); end
307
+
308
+ # Length of the widest label in the #list.
309
+ #
310
+ # pkg:gem/benchmark#lib/benchmark.rb:378
311
+ def width; end
312
+ end
313
+
314
+ # This class is used by the Benchmark.benchmark and Benchmark.bm methods.
315
+ # It is of little direct interest to the user.
316
+ #
317
+ # pkg:gem/benchmark#lib/benchmark.rb:385
318
+ class Benchmark::Report
319
+ # Returns an initialized Report instance.
320
+ # Usually, one doesn't call this method directly, as new
321
+ # Report objects are created by the #benchmark and #bm methods.
322
+ # +width+ and +format+ are the label offset and
323
+ # format string used by Tms#format.
324
+ #
325
+ # pkg:gem/benchmark#lib/benchmark.rb:393
326
+ def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end
327
+
328
+ # An array of Benchmark::Tms objects representing each item.
329
+ #
330
+ # pkg:gem/benchmark#lib/benchmark.rb:412
331
+ def format; end
332
+
333
+ # Prints the +label+ and measured time for the block,
334
+ # formatted by +format+. See Tms#format for the
335
+ # formatting rules.
336
+ #
337
+ # pkg:gem/benchmark#lib/benchmark.rb:402
338
+ def item(label = T.unsafe(nil), *format, &blk); end
339
+
340
+ # An array of Benchmark::Tms objects representing each item.
341
+ #
342
+ # pkg:gem/benchmark#lib/benchmark.rb:412
343
+ def list; end
344
+
345
+ # pkg:gem/benchmark#lib/benchmark.rb:409
346
+ def report(label = T.unsafe(nil), *format, &blk); end
347
+
348
+ # An array of Benchmark::Tms objects representing each item.
349
+ #
350
+ # pkg:gem/benchmark#lib/benchmark.rb:412
351
+ def width; end
352
+ end
353
+
354
+ # A data object, representing the times associated with a benchmark
355
+ # measurement.
356
+ #
357
+ # pkg:gem/benchmark#lib/benchmark.rb:421
358
+ class Benchmark::Tms
359
+ # Returns an initialized Tms object which has
360
+ # +utime+ as the user CPU time, +stime+ as the system CPU time,
361
+ # +cutime+ as the children's user CPU time, +cstime+ as the children's
362
+ # system CPU time, +real+ as the elapsed real time and +label+ as the label.
363
+ #
364
+ # pkg:gem/benchmark#lib/benchmark.rb:456
365
+ def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end
366
+
367
+ # Returns a new Tms object obtained by memberwise multiplication
368
+ # of the individual times for this Tms object by +x+.
369
+ #
370
+ # pkg:gem/benchmark#lib/benchmark.rb:504
371
+ def *(x); end
372
+
373
+ # Returns a new Tms object obtained by memberwise summation
374
+ # of the individual times for this Tms object with those of the +other+
375
+ # Tms object.
376
+ # This method and #/() are useful for taking statistics.
377
+ #
378
+ # pkg:gem/benchmark#lib/benchmark.rb:491
379
+ def +(other); end
380
+
381
+ # Returns a new Tms object obtained by memberwise subtraction
382
+ # of the individual times for the +other+ Tms object from those of this
383
+ # Tms object.
384
+ #
385
+ # pkg:gem/benchmark#lib/benchmark.rb:498
386
+ def -(other); end
387
+
388
+ # Returns a new Tms object obtained by memberwise division
389
+ # of the individual times for this Tms object by +x+.
390
+ # This method and #+() are useful for taking statistics.
391
+ #
392
+ # pkg:gem/benchmark#lib/benchmark.rb:511
393
+ def /(x); end
394
+
395
+ # Returns a new Tms object whose times are the sum of the times for this
396
+ # Tms object, plus the time required to execute the code block (+blk+).
397
+ #
398
+ # pkg:gem/benchmark#lib/benchmark.rb:465
399
+ def add(&blk); end
400
+
401
+ # An in-place version of #add.
402
+ # Changes the times of this Tms object by making it the sum of the times
403
+ # for this Tms object, plus the time required to execute
404
+ # the code block (+blk+).
405
+ #
406
+ # pkg:gem/benchmark#lib/benchmark.rb:475
407
+ def add!(&blk); end
408
+
409
+ # System CPU time of children
410
+ #
411
+ # pkg:gem/benchmark#lib/benchmark.rb:439
412
+ def cstime; end
413
+
414
+ # User CPU time of children
415
+ #
416
+ # pkg:gem/benchmark#lib/benchmark.rb:436
417
+ def cutime; end
418
+
419
+ # Returns the contents of this Tms object as
420
+ # a formatted string, according to a +format+ string
421
+ # like that passed to Kernel.format. In addition, #format
422
+ # accepts the following extensions:
423
+ #
424
+ # <tt>%u</tt>:: Replaced by the user CPU time, as reported by Tms#utime.
425
+ # <tt>%y</tt>:: Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of "s*y*stem")
426
+ # <tt>%U</tt>:: Replaced by the children's user CPU time, as reported by Tms#cutime
427
+ # <tt>%Y</tt>:: Replaced by the children's system CPU time, as reported by Tms#cstime
428
+ # <tt>%t</tt>:: Replaced by the total CPU time, as reported by Tms#total
429
+ # <tt>%r</tt>:: Replaced by the elapsed real time, as reported by Tms#real
430
+ # <tt>%n</tt>:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame")
431
+ #
432
+ # If +format+ is not given, FORMAT is used as default value, detailing the
433
+ # user, system, total and real elapsed time.
434
+ #
435
+ # pkg:gem/benchmark#lib/benchmark.rb:530
436
+ def format(format = T.unsafe(nil), *args); end
437
+
438
+ # Label
439
+ #
440
+ # pkg:gem/benchmark#lib/benchmark.rb:448
441
+ def label; end
442
+
443
+ # Elapsed real time
444
+ #
445
+ # pkg:gem/benchmark#lib/benchmark.rb:442
446
+ def real; end
447
+
448
+ # System CPU time
449
+ #
450
+ # pkg:gem/benchmark#lib/benchmark.rb:433
451
+ def stime; end
452
+
453
+ # Returns a new 6-element array, consisting of the
454
+ # label, user CPU time, system CPU time, children's
455
+ # user CPU time, children's system CPU time and elapsed
456
+ # real time.
457
+ #
458
+ # pkg:gem/benchmark#lib/benchmark.rb:555
459
+ def to_a; end
460
+
461
+ # Returns a hash containing the same data as `to_a`.
462
+ #
463
+ # pkg:gem/benchmark#lib/benchmark.rb:562
464
+ def to_h; end
465
+
466
+ # Same as #format.
467
+ #
468
+ # pkg:gem/benchmark#lib/benchmark.rb:545
469
+ def to_s; end
470
+
471
+ # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+
472
+ #
473
+ # pkg:gem/benchmark#lib/benchmark.rb:445
474
+ def total; end
475
+
476
+ # User CPU time
477
+ #
478
+ # pkg:gem/benchmark#lib/benchmark.rb:430
479
+ def utime; end
480
+
481
+ protected
482
+
483
+ # Returns a new Tms object obtained by memberwise operation +op+
484
+ # of the individual times for this Tms object with those of the other
485
+ # Tms object (+x+).
486
+ #
487
+ # +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
488
+ # <tt>*</tt>, <tt>/</tt>
489
+ #
490
+ # pkg:gem/benchmark#lib/benchmark.rb:583
491
+ def memberwise(op, x); end
492
+ end
493
+
494
+ # pkg:gem/benchmark#lib/benchmark.rb:125
495
+ Benchmark::VERSION = T.let(T.unsafe(nil), String)