sorbet-runtime 0.5.6295 → 0.5.6483

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.
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