Class: SolidCacheMongoid::Entry::Size::Estimate
- Inherits:
-
Object
- Object
- SolidCacheMongoid::Entry::Size::Estimate
- Defined in:
- app/models/solid_cache_mongoid/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.
52 53 54 |
# File 'app/models/solid_cache_mongoid/entry/size/estimate.rb', line 52 def max_records @max_records end |
#samples ⇒ Object (readonly)
Returns the value of attribute samples.
52 53 54 |
# File 'app/models/solid_cache_mongoid/entry/size/estimate.rb', line 52 def samples @samples end |
Instance Method Details
#exact? ⇒ Boolean
63 64 65 |
# File 'app/models/solid_cache_mongoid/entry/size/estimate.rb', line 63 def exact? outliers_count < samples || sampled_fraction == 1 end |
#size ⇒ Object
59 60 61 |
# File 'app/models/solid_cache_mongoid/entry/size/estimate.rb', line 59 def size outliers_size + non_outlier_estimated_size end |