Class: SolidCache::Entry::Size::Estimate
- Inherits:
-
Object
- Object
- SolidCache::Entry::Size::Estimate
- Defined in:
- app/models/solid_cache/entry/size/estimate.rb
Instance Attribute Summary collapse
-
#max_records ⇒ Object
readonly
Returns the value of attribute max_records.
-
#samples ⇒ Object
readonly
Returns the value of attribute samples.
Instance Method Summary collapse
- #exact? ⇒ Boolean
-
#initialize(samples:) ⇒ Estimate
constructor
A new instance of Estimate.
- #size ⇒ Object
Constructor Details
Instance Attribute Details
#max_records ⇒ Object (readonly)
Returns the value of attribute max_records.
51 52 53 |
# File 'app/models/solid_cache/entry/size/estimate.rb', line 51 def max_records @max_records end |
#samples ⇒ Object (readonly)
Returns the value of attribute samples.
51 52 53 |
# File 'app/models/solid_cache/entry/size/estimate.rb', line 51 def samples @samples end |
Instance Method Details
#exact? ⇒ Boolean
62 63 64 |
# File 'app/models/solid_cache/entry/size/estimate.rb', line 62 def exact? outliers_count < samples || sampled_fraction == 1 end |
#size ⇒ Object
58 59 60 |
# File 'app/models/solid_cache/entry/size/estimate.rb', line 58 def size outliers_size + non_outlier_estimated_size end |