checkoff 0.222.0 → 0.225.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/checkoff.gemspec +10 -5
- data/lib/checkoff/attachments.rb +1 -0
- data/lib/checkoff/cli.rb +1 -1
- data/lib/checkoff/clients.rb +2 -1
- data/lib/checkoff/custom_fields.rb +2 -1
- data/lib/checkoff/events.rb +2 -1
- data/lib/checkoff/internal/asana_event_enrichment.rb +1 -0
- data/lib/checkoff/internal/asana_event_filter.rb +1 -0
- data/lib/checkoff/internal/config_loader.rb +2 -2
- data/lib/checkoff/internal/logging.rb +6 -5
- data/lib/checkoff/internal/project_hashes.rb +1 -0
- data/lib/checkoff/internal/project_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/project_timing.rb +1 -0
- data/lib/checkoff/internal/search_url/custom_field_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url/custom_field_variant.rb +1 -0
- data/lib/checkoff/internal/search_url/date_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url/parser.rb +1 -0
- data/lib/checkoff/internal/search_url/results_merger.rb +1 -0
- data/lib/checkoff/internal/search_url/simple_param_converter.rb +1 -0
- data/lib/checkoff/internal/search_url.rb +1 -0
- data/lib/checkoff/internal/section_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/selector_classes/common/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/common.rb +1 -0
- data/lib/checkoff/internal/selector_classes/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/project/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/project.rb +1 -0
- data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -1
- data/lib/checkoff/internal/selector_classes/section.rb +1 -0
- data/lib/checkoff/internal/selector_classes/task/function_evaluator.rb +1 -0
- data/lib/checkoff/internal/selector_classes/task.rb +1 -0
- data/lib/checkoff/internal/selector_evaluator.rb +5 -4
- data/lib/checkoff/internal/task_hashes.rb +1 -0
- data/lib/checkoff/internal/task_selector_evaluator.rb +2 -1
- data/lib/checkoff/internal/task_timing.rb +1 -0
- data/lib/checkoff/internal/thread_local.rb +1 -0
- data/lib/checkoff/monkeypatches/resource_marshalling.rb +1 -0
- data/lib/checkoff/my_tasks.rb +2 -1
- data/lib/checkoff/portfolios.rb +12 -9
- data/lib/checkoff/project_selectors.rb +1 -0
- data/lib/checkoff/projects.rb +3 -1
- data/lib/checkoff/resources.rb +1 -0
- data/lib/checkoff/section_selectors.rb +1 -0
- data/lib/checkoff/sections.rb +4 -4
- data/lib/checkoff/subtasks.rb +1 -0
- data/lib/checkoff/tags.rb +67 -17
- data/lib/checkoff/task_searches.rb +1 -0
- data/lib/checkoff/task_selectors.rb +1 -0
- data/lib/checkoff/tasks.rb +2 -2
- data/lib/checkoff/timelines.rb +1 -0
- data/lib/checkoff/timing.rb +1 -0
- data/lib/checkoff/version.rb +2 -1
- data/lib/checkoff/workspaces.rb +2 -1
- data/lib/checkoff.rb +1 -0
- data/rbi/checkoff.rbi +4529 -0
- data/sig/checkoff.rbs +3749 -0
- metadata +4 -205
- data/.circleci/config.yml +0 -291
- data/.envrc +0 -9
- data/.git-hooks/pre_commit/circle_ci.rb +0 -25
- data/.git-hooks/pre_commit/punchlist.rb +0 -51
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -76
- data/.gitattributes +0 -6
- data/.gitignore +0 -61
- data/.markdownlint_style.rb +0 -3
- data/.mdlrc +0 -1
- data/.overcommit.yml +0 -114
- data/.rubocop.yml +0 -143
- data/.rubocop_todo.yml +0 -90
- data/.solargraph.yml +0 -35
- data/.yamllint.yml +0 -8
- data/CODE_OF_CONDUCT.md +0 -133
- data/CONTRIBUTING.rst +0 -75
- data/DEVELOPMENT.md +0 -69
- data/GLOSSARY.md +0 -16
- data/Gemfile +0 -66
- data/Gemfile.lock +0 -336
- data/LICENSE +0 -21
- data/Makefile +0 -121
- data/bin/brakeman +0 -27
- data/bin/bump +0 -29
- data/bin/checkoff +0 -29
- data/bin/console +0 -15
- data/bin/overcommit +0 -29
- data/bin/overcommit_branch +0 -114
- data/bin/rake +0 -29
- data/bin/rubocop +0 -27
- data/bin/setup +0 -8
- data/bin/solargraph +0 -27
- data/bin/sord +0 -27
- data/bin/spoom +0 -27
- data/bin/srb +0 -27
- data/bin/srb-rbi +0 -27
- data/bin/tapioca +0 -27
- data/bin/yard +0 -27
- data/config/annotations_asana.rb +0 -254
- data/config/annotations_misc.rb +0 -68
- data/config/env.1p +0 -2
- data/docs/.gitignore +0 -3
- data/docs/cookiecutter_input.json +0 -17
- data/docs/example_project.png +0 -0
- data/fix.sh +0 -534
- data/metrics/bigfiles_high_water_mark +0 -1
- data/metrics/brakeman_high_water_mark +0 -1
- data/metrics/bundle-audit_high_water_mark +0 -1
- data/metrics/cane_high_water_mark +0 -1
- data/metrics/eslint_high_water_mark +0 -1
- data/metrics/flake8_high_water_mark +0 -1
- data/metrics/flay_high_water_mark +0 -1
- data/metrics/flog_high_water_mark +0 -1
- data/metrics/jscs_high_water_mark +0 -1
- data/metrics/mdl_high_water_mark +0 -1
- data/metrics/pep8_high_water_mark +0 -1
- data/metrics/punchlist_high_water_mark +0 -1
- data/metrics/pycodestyle_high_water_mark +0 -1
- data/metrics/rails_best_practices_high_water_mark +0 -1
- data/metrics/rubocop_high_water_mark +0 -1
- data/metrics/scalastyle_high_water_mark +0 -1
- data/metrics/shellcheck_high_water_mark +0 -1
- data/package.json +0 -9
- data/rakelib/citest.rake +0 -4
- data/rakelib/clear_metrics.rake +0 -9
- data/rakelib/console.rake +0 -15
- data/rakelib/default.rake +0 -4
- data/rakelib/doc.rake +0 -6
- data/rakelib/gem_tasks.rake +0 -3
- data/rakelib/localtest.rake +0 -4
- data/rakelib/overcommit.rake +0 -6
- data/rakelib/quality.rake +0 -4
- data/rakelib/repl.rake +0 -4
- data/rakelib/test.rake +0 -10
- data/rakelib/trigger_next_builds.rake +0 -7
- data/rakelib/undercover.rake +0 -8
- data/requirements_dev.txt +0 -2
- data/sorbet/config +0 -4
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/activesupport.rbi +0 -453
- data/sorbet/rbi/annotations/faraday.rbi +0 -17
- data/sorbet/rbi/annotations/minitest.rbi +0 -119
- data/sorbet/rbi/annotations/mocha.rbi +0 -34
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/annotations/webmock.rbi +0 -9
- data/sorbet/rbi/dsl/.gitattributes +0 -1
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
- data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
- data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
- data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
- data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
- data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
- data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
- data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
- data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
- data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
- data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
- data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
- data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
- data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
- data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
- data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
- data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
- data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
- data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
- data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
- data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
- data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
- data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
- data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
- data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
- data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
- data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7061
- data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
- data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
- data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
- data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
- data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
- data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
- data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
- data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
- data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
- data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
- data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
- data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
- data/sorbet/rbi/todo.rbi +0 -11
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
@@ -1,618 +0,0 @@
|
|
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 sum of
|
23
|
-
# the user and system CPU times, and the elapsed real time. The unit
|
24
|
-
# of time is seconds.
|
25
|
-
#
|
26
|
-
# * Do some experiments sequentially using the #bm method:
|
27
|
-
#
|
28
|
-
# require 'benchmark'
|
29
|
-
#
|
30
|
-
# n = 5000000
|
31
|
-
# Benchmark.bm do |x|
|
32
|
-
# x.report { for i in 1..n; a = "1"; end }
|
33
|
-
# x.report { n.times do ; a = "1"; end }
|
34
|
-
# x.report { 1.upto(n) do ; a = "1"; end }
|
35
|
-
# end
|
36
|
-
#
|
37
|
-
# The result:
|
38
|
-
#
|
39
|
-
# user system total real
|
40
|
-
# 1.010000 0.000000 1.010000 ( 1.014479)
|
41
|
-
# 1.000000 0.000000 1.000000 ( 0.998261)
|
42
|
-
# 0.980000 0.000000 0.980000 ( 0.981335)
|
43
|
-
#
|
44
|
-
# * Continuing the previous example, put a label in each report:
|
45
|
-
#
|
46
|
-
# require 'benchmark'
|
47
|
-
#
|
48
|
-
# n = 5000000
|
49
|
-
# Benchmark.bm(7) do |x|
|
50
|
-
# x.report("for:") { for i in 1..n; a = "1"; end }
|
51
|
-
# x.report("times:") { n.times do ; a = "1"; end }
|
52
|
-
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
53
|
-
# end
|
54
|
-
#
|
55
|
-
# The result:
|
56
|
-
#
|
57
|
-
# user system total real
|
58
|
-
# for: 1.010000 0.000000 1.010000 ( 1.015688)
|
59
|
-
# times: 1.000000 0.000000 1.000000 ( 1.003611)
|
60
|
-
# upto: 1.030000 0.000000 1.030000 ( 1.028098)
|
61
|
-
#
|
62
|
-
# * The times for some benchmarks depend on the order in which items
|
63
|
-
# are run. These differences are due to the cost of memory
|
64
|
-
# allocation and garbage collection. To avoid these discrepancies,
|
65
|
-
# the #bmbm method is provided. For example, to compare ways to
|
66
|
-
# sort an array of floats:
|
67
|
-
#
|
68
|
-
# require 'benchmark'
|
69
|
-
#
|
70
|
-
# array = (1..1000000).map { rand }
|
71
|
-
#
|
72
|
-
# Benchmark.bmbm do |x|
|
73
|
-
# x.report("sort!") { array.dup.sort! }
|
74
|
-
# x.report("sort") { array.dup.sort }
|
75
|
-
# end
|
76
|
-
#
|
77
|
-
# The result:
|
78
|
-
#
|
79
|
-
# Rehearsal -----------------------------------------
|
80
|
-
# sort! 1.490000 0.010000 1.500000 ( 1.490520)
|
81
|
-
# sort 1.460000 0.000000 1.460000 ( 1.463025)
|
82
|
-
# -------------------------------- total: 2.960000sec
|
83
|
-
#
|
84
|
-
# user system total real
|
85
|
-
# sort! 1.460000 0.000000 1.460000 ( 1.460465)
|
86
|
-
# sort 1.450000 0.010000 1.460000 ( 1.448327)
|
87
|
-
#
|
88
|
-
# * Report statistics of sequential experiments with unique labels,
|
89
|
-
# using the #benchmark method:
|
90
|
-
#
|
91
|
-
# require 'benchmark'
|
92
|
-
# include Benchmark # we need the CAPTION and FORMAT constants
|
93
|
-
#
|
94
|
-
# n = 5000000
|
95
|
-
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
|
96
|
-
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
|
97
|
-
# tt = x.report("times:") { n.times do ; a = "1"; end }
|
98
|
-
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
99
|
-
# [tf+tt+tu, (tf+tt+tu)/3]
|
100
|
-
# end
|
101
|
-
#
|
102
|
-
# The result:
|
103
|
-
#
|
104
|
-
# user system total real
|
105
|
-
# for: 0.950000 0.000000 0.950000 ( 0.952039)
|
106
|
-
# times: 0.980000 0.000000 0.980000 ( 0.984938)
|
107
|
-
# upto: 0.950000 0.000000 0.950000 ( 0.946787)
|
108
|
-
# >total: 2.880000 0.000000 2.880000 ( 2.883764)
|
109
|
-
# >avg: 0.960000 0.000000 0.960000 ( 0.961255)
|
110
|
-
#
|
111
|
-
# source://benchmark//lib/benchmark.rb#122
|
112
|
-
module Benchmark
|
113
|
-
private
|
114
|
-
|
115
|
-
# Invokes the block with a Benchmark::Report object, which
|
116
|
-
# may be used to collect and report on the results of individual
|
117
|
-
# benchmark tests. Reserves +label_width+ leading spaces for
|
118
|
-
# labels on each line. Prints +caption+ at the top of the
|
119
|
-
# report, and uses +format+ to format each line.
|
120
|
-
# (Note: +caption+ must contain a terminating newline character,
|
121
|
-
# see the default Benchmark::Tms::CAPTION for an example.)
|
122
|
-
#
|
123
|
-
# Returns an array of Benchmark::Tms objects.
|
124
|
-
#
|
125
|
-
# If the block returns an array of
|
126
|
-
# Benchmark::Tms objects, these will be used to format
|
127
|
-
# additional lines of output. If +labels+ parameter are
|
128
|
-
# given, these are used to label these extra lines.
|
129
|
-
#
|
130
|
-
# _Note_: Other methods provide a simpler interface to this one, and are
|
131
|
-
# suitable for nearly all benchmarking requirements. See the examples in
|
132
|
-
# Benchmark, and the #bm and #bmbm methods.
|
133
|
-
#
|
134
|
-
# Example:
|
135
|
-
#
|
136
|
-
# require 'benchmark'
|
137
|
-
# include Benchmark # we need the CAPTION and FORMAT constants
|
138
|
-
#
|
139
|
-
# n = 5000000
|
140
|
-
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
|
141
|
-
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
|
142
|
-
# tt = x.report("times:") { n.times do ; a = "1"; end }
|
143
|
-
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
144
|
-
# [tf+tt+tu, (tf+tt+tu)/3]
|
145
|
-
# end
|
146
|
-
#
|
147
|
-
# Generates:
|
148
|
-
#
|
149
|
-
# user system total real
|
150
|
-
# for: 0.970000 0.000000 0.970000 ( 0.970493)
|
151
|
-
# times: 0.990000 0.000000 0.990000 ( 0.989542)
|
152
|
-
# upto: 0.970000 0.000000 0.970000 ( 0.972854)
|
153
|
-
# >total: 2.930000 0.000000 2.930000 ( 2.932889)
|
154
|
-
# >avg: 0.976667 0.000000 0.976667 ( 0.977630)
|
155
|
-
#
|
156
|
-
# source://benchmark//lib/benchmark.rb#170
|
157
|
-
def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
|
158
|
-
|
159
|
-
# A simple interface to the #benchmark method, #bm generates sequential
|
160
|
-
# reports with labels. +label_width+ and +labels+ parameters have the same
|
161
|
-
# meaning as for #benchmark.
|
162
|
-
#
|
163
|
-
# require 'benchmark'
|
164
|
-
#
|
165
|
-
# n = 5000000
|
166
|
-
# Benchmark.bm(7) do |x|
|
167
|
-
# x.report("for:") { for i in 1..n; a = "1"; end }
|
168
|
-
# x.report("times:") { n.times do ; a = "1"; end }
|
169
|
-
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
170
|
-
# end
|
171
|
-
#
|
172
|
-
# Generates:
|
173
|
-
#
|
174
|
-
# user system total real
|
175
|
-
# for: 0.960000 0.000000 0.960000 ( 0.957966)
|
176
|
-
# times: 0.960000 0.000000 0.960000 ( 0.960423)
|
177
|
-
# upto: 0.950000 0.000000 0.950000 ( 0.954864)
|
178
|
-
#
|
179
|
-
# source://benchmark//lib/benchmark.rb#215
|
180
|
-
def bm(label_width = T.unsafe(nil), *labels, &blk); end
|
181
|
-
|
182
|
-
# Sometimes benchmark results are skewed because code executed
|
183
|
-
# earlier encounters different garbage collection overheads than
|
184
|
-
# that run later. #bmbm attempts to minimize this effect by running
|
185
|
-
# the tests twice, the first time as a rehearsal in order to get the
|
186
|
-
# runtime environment stable, the second time for
|
187
|
-
# real. GC.start is executed before the start of each of
|
188
|
-
# the real timings; the cost of this is not included in the
|
189
|
-
# timings. In reality, though, there's only so much that #bmbm can
|
190
|
-
# do, and the results are not guaranteed to be isolated from garbage
|
191
|
-
# collection and other effects.
|
192
|
-
#
|
193
|
-
# Because #bmbm takes two passes through the tests, it can
|
194
|
-
# calculate the required label width.
|
195
|
-
#
|
196
|
-
# require 'benchmark'
|
197
|
-
#
|
198
|
-
# array = (1..1000000).map { rand }
|
199
|
-
#
|
200
|
-
# Benchmark.bmbm do |x|
|
201
|
-
# x.report("sort!") { array.dup.sort! }
|
202
|
-
# x.report("sort") { array.dup.sort }
|
203
|
-
# end
|
204
|
-
#
|
205
|
-
# Generates:
|
206
|
-
#
|
207
|
-
# Rehearsal -----------------------------------------
|
208
|
-
# sort! 1.440000 0.010000 1.450000 ( 1.446833)
|
209
|
-
# sort 1.440000 0.000000 1.440000 ( 1.448257)
|
210
|
-
# -------------------------------- total: 2.890000sec
|
211
|
-
#
|
212
|
-
# user system total real
|
213
|
-
# sort! 1.460000 0.000000 1.460000 ( 1.458065)
|
214
|
-
# sort 1.450000 0.000000 1.450000 ( 1.455963)
|
215
|
-
#
|
216
|
-
# #bmbm yields a Benchmark::Job object and returns an array of
|
217
|
-
# Benchmark::Tms objects.
|
218
|
-
#
|
219
|
-
# source://benchmark//lib/benchmark.rb#257
|
220
|
-
def bmbm(width = T.unsafe(nil)); end
|
221
|
-
|
222
|
-
# Returns the time used to execute the given block as a
|
223
|
-
# Benchmark::Tms object. Takes +label+ option.
|
224
|
-
#
|
225
|
-
# require 'benchmark'
|
226
|
-
#
|
227
|
-
# n = 1000000
|
228
|
-
#
|
229
|
-
# time = Benchmark.measure do
|
230
|
-
# n.times { a = "1" }
|
231
|
-
# end
|
232
|
-
# puts time
|
233
|
-
#
|
234
|
-
# Generates:
|
235
|
-
#
|
236
|
-
# 0.220000 0.000000 0.220000 ( 0.227313)
|
237
|
-
#
|
238
|
-
# source://benchmark//lib/benchmark.rb#302
|
239
|
-
def measure(label = T.unsafe(nil)); end
|
240
|
-
|
241
|
-
# Returns the elapsed real time used to execute the given block.
|
242
|
-
# The unit of time is seconds.
|
243
|
-
#
|
244
|
-
# Benchmark.realtime { "a" * 1_000_000_000 }
|
245
|
-
# #=> 0.5098029999935534
|
246
|
-
#
|
247
|
-
# source://benchmark//lib/benchmark.rb#321
|
248
|
-
def realtime; end
|
249
|
-
|
250
|
-
class << self
|
251
|
-
# Invokes the block with a Benchmark::Report object, which
|
252
|
-
# may be used to collect and report on the results of individual
|
253
|
-
# benchmark tests. Reserves +label_width+ leading spaces for
|
254
|
-
# labels on each line. Prints +caption+ at the top of the
|
255
|
-
# report, and uses +format+ to format each line.
|
256
|
-
# (Note: +caption+ must contain a terminating newline character,
|
257
|
-
# see the default Benchmark::Tms::CAPTION for an example.)
|
258
|
-
#
|
259
|
-
# Returns an array of Benchmark::Tms objects.
|
260
|
-
#
|
261
|
-
# If the block returns an array of
|
262
|
-
# Benchmark::Tms objects, these will be used to format
|
263
|
-
# additional lines of output. If +labels+ parameter are
|
264
|
-
# given, these are used to label these extra lines.
|
265
|
-
#
|
266
|
-
# _Note_: Other methods provide a simpler interface to this one, and are
|
267
|
-
# suitable for nearly all benchmarking requirements. See the examples in
|
268
|
-
# Benchmark, and the #bm and #bmbm methods.
|
269
|
-
#
|
270
|
-
# Example:
|
271
|
-
#
|
272
|
-
# require 'benchmark'
|
273
|
-
# include Benchmark # we need the CAPTION and FORMAT constants
|
274
|
-
#
|
275
|
-
# n = 5000000
|
276
|
-
# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x|
|
277
|
-
# tf = x.report("for:") { for i in 1..n; a = "1"; end }
|
278
|
-
# tt = x.report("times:") { n.times do ; a = "1"; end }
|
279
|
-
# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
280
|
-
# [tf+tt+tu, (tf+tt+tu)/3]
|
281
|
-
# end
|
282
|
-
#
|
283
|
-
# Generates:
|
284
|
-
#
|
285
|
-
# user system total real
|
286
|
-
# for: 0.970000 0.000000 0.970000 ( 0.970493)
|
287
|
-
# times: 0.990000 0.000000 0.990000 ( 0.989542)
|
288
|
-
# upto: 0.970000 0.000000 0.970000 ( 0.972854)
|
289
|
-
# >total: 2.930000 0.000000 2.930000 ( 2.932889)
|
290
|
-
# >avg: 0.976667 0.000000 0.976667 ( 0.977630)
|
291
|
-
#
|
292
|
-
# source://benchmark//lib/benchmark.rb#170
|
293
|
-
def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end
|
294
|
-
|
295
|
-
# A simple interface to the #benchmark method, #bm generates sequential
|
296
|
-
# reports with labels. +label_width+ and +labels+ parameters have the same
|
297
|
-
# meaning as for #benchmark.
|
298
|
-
#
|
299
|
-
# require 'benchmark'
|
300
|
-
#
|
301
|
-
# n = 5000000
|
302
|
-
# Benchmark.bm(7) do |x|
|
303
|
-
# x.report("for:") { for i in 1..n; a = "1"; end }
|
304
|
-
# x.report("times:") { n.times do ; a = "1"; end }
|
305
|
-
# x.report("upto:") { 1.upto(n) do ; a = "1"; end }
|
306
|
-
# end
|
307
|
-
#
|
308
|
-
# Generates:
|
309
|
-
#
|
310
|
-
# user system total real
|
311
|
-
# for: 0.960000 0.000000 0.960000 ( 0.957966)
|
312
|
-
# times: 0.960000 0.000000 0.960000 ( 0.960423)
|
313
|
-
# upto: 0.950000 0.000000 0.950000 ( 0.954864)
|
314
|
-
#
|
315
|
-
# source://benchmark//lib/benchmark.rb#215
|
316
|
-
def bm(label_width = T.unsafe(nil), *labels, &blk); end
|
317
|
-
|
318
|
-
# Sometimes benchmark results are skewed because code executed
|
319
|
-
# earlier encounters different garbage collection overheads than
|
320
|
-
# that run later. #bmbm attempts to minimize this effect by running
|
321
|
-
# the tests twice, the first time as a rehearsal in order to get the
|
322
|
-
# runtime environment stable, the second time for
|
323
|
-
# real. GC.start is executed before the start of each of
|
324
|
-
# the real timings; the cost of this is not included in the
|
325
|
-
# timings. In reality, though, there's only so much that #bmbm can
|
326
|
-
# do, and the results are not guaranteed to be isolated from garbage
|
327
|
-
# collection and other effects.
|
328
|
-
#
|
329
|
-
# Because #bmbm takes two passes through the tests, it can
|
330
|
-
# calculate the required label width.
|
331
|
-
#
|
332
|
-
# require 'benchmark'
|
333
|
-
#
|
334
|
-
# array = (1..1000000).map { rand }
|
335
|
-
#
|
336
|
-
# Benchmark.bmbm do |x|
|
337
|
-
# x.report("sort!") { array.dup.sort! }
|
338
|
-
# x.report("sort") { array.dup.sort }
|
339
|
-
# end
|
340
|
-
#
|
341
|
-
# Generates:
|
342
|
-
#
|
343
|
-
# Rehearsal -----------------------------------------
|
344
|
-
# sort! 1.440000 0.010000 1.450000 ( 1.446833)
|
345
|
-
# sort 1.440000 0.000000 1.440000 ( 1.448257)
|
346
|
-
# -------------------------------- total: 2.890000sec
|
347
|
-
#
|
348
|
-
# user system total real
|
349
|
-
# sort! 1.460000 0.000000 1.460000 ( 1.458065)
|
350
|
-
# sort 1.450000 0.000000 1.450000 ( 1.455963)
|
351
|
-
#
|
352
|
-
# #bmbm yields a Benchmark::Job object and returns an array of
|
353
|
-
# Benchmark::Tms objects.
|
354
|
-
#
|
355
|
-
# source://benchmark//lib/benchmark.rb#257
|
356
|
-
def bmbm(width = T.unsafe(nil)); end
|
357
|
-
|
358
|
-
# Returns the time used to execute the given block as a
|
359
|
-
# Benchmark::Tms object. Takes +label+ option.
|
360
|
-
#
|
361
|
-
# require 'benchmark'
|
362
|
-
#
|
363
|
-
# n = 1000000
|
364
|
-
#
|
365
|
-
# time = Benchmark.measure do
|
366
|
-
# n.times { a = "1" }
|
367
|
-
# end
|
368
|
-
# puts time
|
369
|
-
#
|
370
|
-
# Generates:
|
371
|
-
#
|
372
|
-
# 0.220000 0.000000 0.220000 ( 0.227313)
|
373
|
-
#
|
374
|
-
# source://benchmark//lib/benchmark.rb#302
|
375
|
-
def measure(label = T.unsafe(nil)); end
|
376
|
-
|
377
|
-
# Returns the elapsed real time used to execute the given block.
|
378
|
-
# The unit of time is seconds.
|
379
|
-
#
|
380
|
-
# Benchmark.realtime { "a" * 1_000_000_000 }
|
381
|
-
# #=> 0.5098029999935534
|
382
|
-
#
|
383
|
-
# source://benchmark//lib/benchmark.rb#321
|
384
|
-
def realtime; end
|
385
|
-
end
|
386
|
-
end
|
387
|
-
|
388
|
-
# A Job is a sequence of labelled blocks to be processed by the
|
389
|
-
# Benchmark.bmbm method. It is of little direct interest to the user.
|
390
|
-
#
|
391
|
-
# source://benchmark//lib/benchmark.rb#333
|
392
|
-
class Benchmark::Job
|
393
|
-
# Returns an initialized Job instance.
|
394
|
-
# Usually, one doesn't call this method directly, as new
|
395
|
-
# Job objects are created by the #bmbm method.
|
396
|
-
# +width+ is a initial value for the label offset used in formatting;
|
397
|
-
# the #bmbm method passes its +width+ argument to this constructor.
|
398
|
-
#
|
399
|
-
# @return [Job] a new instance of Job
|
400
|
-
#
|
401
|
-
# source://benchmark//lib/benchmark.rb#341
|
402
|
-
def initialize(width); end
|
403
|
-
|
404
|
-
# Registers the given label and block pair in the job list.
|
405
|
-
#
|
406
|
-
# @raise [ArgumentError]
|
407
|
-
#
|
408
|
-
# source://benchmark//lib/benchmark.rb#349
|
409
|
-
def item(label = T.unsafe(nil), &blk); end
|
410
|
-
|
411
|
-
# An array of 2-element arrays, consisting of label and block pairs.
|
412
|
-
#
|
413
|
-
# source://benchmark//lib/benchmark.rb#361
|
414
|
-
def list; end
|
415
|
-
|
416
|
-
# Registers the given label and block pair in the job list.
|
417
|
-
#
|
418
|
-
# @raise [ArgumentError]
|
419
|
-
#
|
420
|
-
# source://benchmark//lib/benchmark.rb#349
|
421
|
-
def report(label = T.unsafe(nil), &blk); end
|
422
|
-
|
423
|
-
# Length of the widest label in the #list.
|
424
|
-
#
|
425
|
-
# source://benchmark//lib/benchmark.rb#364
|
426
|
-
def width; end
|
427
|
-
end
|
428
|
-
|
429
|
-
# This class is used by the Benchmark.benchmark and Benchmark.bm methods.
|
430
|
-
# It is of little direct interest to the user.
|
431
|
-
#
|
432
|
-
# source://benchmark//lib/benchmark.rb#371
|
433
|
-
class Benchmark::Report
|
434
|
-
# Returns an initialized Report instance.
|
435
|
-
# Usually, one doesn't call this method directly, as new
|
436
|
-
# Report objects are created by the #benchmark and #bm methods.
|
437
|
-
# +width+ and +format+ are the label offset and
|
438
|
-
# format string used by Tms#format.
|
439
|
-
#
|
440
|
-
# @return [Report] a new instance of Report
|
441
|
-
#
|
442
|
-
# source://benchmark//lib/benchmark.rb#379
|
443
|
-
def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end
|
444
|
-
|
445
|
-
# An array of Benchmark::Tms objects representing each item.
|
446
|
-
#
|
447
|
-
# source://benchmark//lib/benchmark.rb#398
|
448
|
-
def format; end
|
449
|
-
|
450
|
-
# Prints the +label+ and measured time for the block,
|
451
|
-
# formatted by +format+. See Tms#format for the
|
452
|
-
# formatting rules.
|
453
|
-
#
|
454
|
-
# source://benchmark//lib/benchmark.rb#388
|
455
|
-
def item(label = T.unsafe(nil), *format, &blk); end
|
456
|
-
|
457
|
-
# An array of Benchmark::Tms objects representing each item.
|
458
|
-
#
|
459
|
-
# source://benchmark//lib/benchmark.rb#398
|
460
|
-
def list; end
|
461
|
-
|
462
|
-
# Prints the +label+ and measured time for the block,
|
463
|
-
# formatted by +format+. See Tms#format for the
|
464
|
-
# formatting rules.
|
465
|
-
#
|
466
|
-
# source://benchmark//lib/benchmark.rb#388
|
467
|
-
def report(label = T.unsafe(nil), *format, &blk); end
|
468
|
-
|
469
|
-
# An array of Benchmark::Tms objects representing each item.
|
470
|
-
#
|
471
|
-
# source://benchmark//lib/benchmark.rb#398
|
472
|
-
def width; end
|
473
|
-
end
|
474
|
-
|
475
|
-
# A data object, representing the times associated with a benchmark
|
476
|
-
# measurement.
|
477
|
-
#
|
478
|
-
# source://benchmark//lib/benchmark.rb#407
|
479
|
-
class Benchmark::Tms
|
480
|
-
# Returns an initialized Tms object which has
|
481
|
-
# +utime+ as the user CPU time, +stime+ as the system CPU time,
|
482
|
-
# +cutime+ as the children's user CPU time, +cstime+ as the children's
|
483
|
-
# system CPU time, +real+ as the elapsed real time and +label+ as the label.
|
484
|
-
#
|
485
|
-
# @return [Tms] a new instance of Tms
|
486
|
-
#
|
487
|
-
# source://benchmark//lib/benchmark.rb#442
|
488
|
-
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
|
489
|
-
|
490
|
-
# Returns a new Tms object obtained by memberwise multiplication
|
491
|
-
# of the individual times for this Tms object by +x+.
|
492
|
-
#
|
493
|
-
# source://benchmark//lib/benchmark.rb#490
|
494
|
-
def *(x); end
|
495
|
-
|
496
|
-
# Returns a new Tms object obtained by memberwise summation
|
497
|
-
# of the individual times for this Tms object with those of the +other+
|
498
|
-
# Tms object.
|
499
|
-
# This method and #/() are useful for taking statistics.
|
500
|
-
#
|
501
|
-
# source://benchmark//lib/benchmark.rb#477
|
502
|
-
def +(other); end
|
503
|
-
|
504
|
-
# Returns a new Tms object obtained by memberwise subtraction
|
505
|
-
# of the individual times for the +other+ Tms object from those of this
|
506
|
-
# Tms object.
|
507
|
-
#
|
508
|
-
# source://benchmark//lib/benchmark.rb#484
|
509
|
-
def -(other); end
|
510
|
-
|
511
|
-
# Returns a new Tms object obtained by memberwise division
|
512
|
-
# of the individual times for this Tms object by +x+.
|
513
|
-
# This method and #+() are useful for taking statistics.
|
514
|
-
#
|
515
|
-
# source://benchmark//lib/benchmark.rb#497
|
516
|
-
def /(x); end
|
517
|
-
|
518
|
-
# Returns a new Tms object whose times are the sum of the times for this
|
519
|
-
# Tms object, plus the time required to execute the code block (+blk+).
|
520
|
-
#
|
521
|
-
# source://benchmark//lib/benchmark.rb#451
|
522
|
-
def add(&blk); end
|
523
|
-
|
524
|
-
# An in-place version of #add.
|
525
|
-
# Changes the times of this Tms object by making it the sum of the times
|
526
|
-
# for this Tms object, plus the time required to execute
|
527
|
-
# the code block (+blk+).
|
528
|
-
#
|
529
|
-
# source://benchmark//lib/benchmark.rb#461
|
530
|
-
def add!(&blk); end
|
531
|
-
|
532
|
-
# System CPU time of children
|
533
|
-
#
|
534
|
-
# source://benchmark//lib/benchmark.rb#425
|
535
|
-
def cstime; end
|
536
|
-
|
537
|
-
# User CPU time of children
|
538
|
-
#
|
539
|
-
# source://benchmark//lib/benchmark.rb#422
|
540
|
-
def cutime; end
|
541
|
-
|
542
|
-
# Returns the contents of this Tms object as
|
543
|
-
# a formatted string, according to a +format+ string
|
544
|
-
# like that passed to Kernel.format. In addition, #format
|
545
|
-
# accepts the following extensions:
|
546
|
-
#
|
547
|
-
# <tt>%u</tt>:: Replaced by the user CPU time, as reported by Tms#utime.
|
548
|
-
# <tt>%y</tt>:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem")
|
549
|
-
# <tt>%U</tt>:: Replaced by the children's user CPU time, as reported by Tms#cutime
|
550
|
-
# <tt>%Y</tt>:: Replaced by the children's system CPU time, as reported by Tms#cstime
|
551
|
-
# <tt>%t</tt>:: Replaced by the total CPU time, as reported by Tms#total
|
552
|
-
# <tt>%r</tt>:: Replaced by the elapsed real time, as reported by Tms#real
|
553
|
-
# <tt>%n</tt>:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame")
|
554
|
-
#
|
555
|
-
# If +format+ is not given, FORMAT is used as default value, detailing the
|
556
|
-
# user, system and real elapsed time.
|
557
|
-
#
|
558
|
-
# source://benchmark//lib/benchmark.rb#516
|
559
|
-
def format(format = T.unsafe(nil), *args); end
|
560
|
-
|
561
|
-
# Label
|
562
|
-
#
|
563
|
-
# source://benchmark//lib/benchmark.rb#434
|
564
|
-
def label; end
|
565
|
-
|
566
|
-
# Elapsed real time
|
567
|
-
#
|
568
|
-
# source://benchmark//lib/benchmark.rb#428
|
569
|
-
def real; end
|
570
|
-
|
571
|
-
# System CPU time
|
572
|
-
#
|
573
|
-
# source://benchmark//lib/benchmark.rb#419
|
574
|
-
def stime; end
|
575
|
-
|
576
|
-
# Returns a new 6-element array, consisting of the
|
577
|
-
# label, user CPU time, system CPU time, children's
|
578
|
-
# user CPU time, children's system CPU time and elapsed
|
579
|
-
# real time.
|
580
|
-
#
|
581
|
-
# source://benchmark//lib/benchmark.rb#541
|
582
|
-
def to_a; end
|
583
|
-
|
584
|
-
# Returns a hash containing the same data as `to_a`.
|
585
|
-
#
|
586
|
-
# source://benchmark//lib/benchmark.rb#548
|
587
|
-
def to_h; end
|
588
|
-
|
589
|
-
# Same as #format.
|
590
|
-
#
|
591
|
-
# source://benchmark//lib/benchmark.rb#531
|
592
|
-
def to_s; end
|
593
|
-
|
594
|
-
# Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+
|
595
|
-
#
|
596
|
-
# source://benchmark//lib/benchmark.rb#431
|
597
|
-
def total; end
|
598
|
-
|
599
|
-
# User CPU time
|
600
|
-
#
|
601
|
-
# source://benchmark//lib/benchmark.rb#416
|
602
|
-
def utime; end
|
603
|
-
|
604
|
-
protected
|
605
|
-
|
606
|
-
# Returns a new Tms object obtained by memberwise operation +op+
|
607
|
-
# of the individual times for this Tms object with those of the other
|
608
|
-
# Tms object (+x+).
|
609
|
-
#
|
610
|
-
# +op+ can be a mathematical operation such as <tt>+</tt>, <tt>-</tt>,
|
611
|
-
# <tt>*</tt>, <tt>/</tt>
|
612
|
-
#
|
613
|
-
# source://benchmark//lib/benchmark.rb#569
|
614
|
-
def memberwise(op, x); end
|
615
|
-
end
|
616
|
-
|
617
|
-
# source://benchmark//lib/benchmark.rb#124
|
618
|
-
Benchmark::VERSION = T.let(T.unsafe(nil), String)
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `bigdecimal` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem bigdecimal`.
|
6
|
-
|
7
|
-
|
8
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#89
|
9
|
-
class BigDecimal < ::Numeric
|
10
|
-
# call-seq:
|
11
|
-
# a.to_d -> bigdecimal
|
12
|
-
#
|
13
|
-
# Returns self.
|
14
|
-
#
|
15
|
-
# require 'bigdecimal/util'
|
16
|
-
#
|
17
|
-
# d = BigDecimal("3.14")
|
18
|
-
# d.to_d # => 0.314e1
|
19
|
-
#
|
20
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#110
|
21
|
-
def to_d; end
|
22
|
-
|
23
|
-
# call-seq:
|
24
|
-
# a.to_digits -> string
|
25
|
-
#
|
26
|
-
# Converts a BigDecimal to a String of the form "nnnnnn.mmm".
|
27
|
-
# This method is deprecated; use BigDecimal#to_s("F") instead.
|
28
|
-
#
|
29
|
-
# require 'bigdecimal/util'
|
30
|
-
#
|
31
|
-
# d = BigDecimal("3.14")
|
32
|
-
# d.to_digits # => "3.14"
|
33
|
-
#
|
34
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#90
|
35
|
-
def to_digits; end
|
36
|
-
end
|
37
|
-
|
38
|
-
BigDecimal::VERSION = T.let(T.unsafe(nil), String)
|
39
|
-
|
40
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#156
|
41
|
-
class Complex < ::Numeric
|
42
|
-
# call-seq:
|
43
|
-
# cmp.to_d -> bigdecimal
|
44
|
-
# cmp.to_d(precision) -> bigdecimal
|
45
|
-
#
|
46
|
-
# Returns the value as a BigDecimal.
|
47
|
-
#
|
48
|
-
# The +precision+ parameter is required for a rational complex number.
|
49
|
-
# This parameter is used to determine the number of significant digits
|
50
|
-
# for the result.
|
51
|
-
#
|
52
|
-
# require 'bigdecimal'
|
53
|
-
# require 'bigdecimal/util'
|
54
|
-
#
|
55
|
-
# Complex(0.1234567, 0).to_d(4) # => 0.1235e0
|
56
|
-
# Complex(Rational(22, 7), 0).to_d(3) # => 0.314e1
|
57
|
-
#
|
58
|
-
# See also Kernel.BigDecimal.
|
59
|
-
#
|
60
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#157
|
61
|
-
def to_d(*args); end
|
62
|
-
end
|
63
|
-
|
64
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#171
|
65
|
-
class NilClass
|
66
|
-
# call-seq:
|
67
|
-
# nil.to_d -> bigdecimal
|
68
|
-
#
|
69
|
-
# Returns nil represented as a BigDecimal.
|
70
|
-
#
|
71
|
-
# require 'bigdecimal'
|
72
|
-
# require 'bigdecimal/util'
|
73
|
-
#
|
74
|
-
# nil.to_d # => 0.0
|
75
|
-
#
|
76
|
-
# source://bigdecimal//lib/bigdecimal/util.rb#182
|
77
|
-
def to_d; end
|
78
|
-
end
|