sorbet-runtime 0.5.6391 → 0.5.6393
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sorbet-runtime.rb +0 -1
- data/lib/types/private/methods/call_validation.rb +11 -23
- data/lib/types/private/methods/call_validation_2_6.rb +595 -173
- data/lib/types/private/methods/call_validation_2_7.rb +595 -173
- metadata +2 -3
- data/lib/types/profile.rb +0 -31
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet-runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6393
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -191,7 +191,6 @@ files:
|
|
191
191
|
- lib/types/private/types/string_holder.rb
|
192
192
|
- lib/types/private/types/type_alias.rb
|
193
193
|
- lib/types/private/types/void.rb
|
194
|
-
- lib/types/profile.rb
|
195
194
|
- lib/types/props/_props.rb
|
196
195
|
- lib/types/props/constructor.rb
|
197
196
|
- lib/types/props/custom_type.rb
|
data/lib/types/profile.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module T::Profile
|
5
|
-
SAMPLE_RATE = 101 # 1 out of that many typechecks will be measured
|
6
|
-
class <<self
|
7
|
-
attr_accessor :typecheck_duration
|
8
|
-
attr_accessor :typecheck_samples
|
9
|
-
attr_accessor :typecheck_sample_attempts
|
10
|
-
def typecheck_duration_estimate
|
11
|
-
total_typechecks = typecheck_samples * SAMPLE_RATE + (SAMPLE_RATE - typecheck_sample_attempts)
|
12
|
-
typechecks_measured = typecheck_samples * SAMPLE_RATE
|
13
|
-
if typechecks_measured.positive?
|
14
|
-
typecheck_duration * SAMPLE_RATE * 1.0 * total_typechecks / typechecks_measured
|
15
|
-
else
|
16
|
-
0.0
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def typecheck_count_estimate
|
21
|
-
typecheck_samples * SAMPLE_RATE
|
22
|
-
end
|
23
|
-
|
24
|
-
def reset
|
25
|
-
@typecheck_duration = 0
|
26
|
-
@typecheck_samples = 0
|
27
|
-
@typecheck_sample_attempts = SAMPLE_RATE
|
28
|
-
end
|
29
|
-
end
|
30
|
-
self.reset
|
31
|
-
end
|