Lucene.Net
3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
|
Estimates the size of a given Object using a given MemoryModel for primitive size information. More...
Public Member Functions | |
RamUsageEstimator () | |
Constructs this object with an AverageGuessMemoryModel and checkInterned = true. | |
RamUsageEstimator (bool checkInterned) | |
RamUsageEstimator (MemoryModel memoryModel) | |
RamUsageEstimator (MemoryModel memoryModel, bool checkInterned) | |
long | EstimateRamUsage (System.Object obj) |
Static Public Member Functions | |
static System.String | HumanReadableUnits (long bytes, System.IFormatProvider df) |
Return good default units based on byte size. | |
Estimates the size of a given Object using a given MemoryModel for primitive size information.
Resource Usage:
Internally uses a Map to temporally hold a reference to every object seen.
If checkIntered, all Strings checked will be interned, but those that were not already interned will be released for GC when the estimate is complete.
Definition at line 36 of file RamUsageEstimator.cs.
Lucene.Net.Util.RamUsageEstimator.RamUsageEstimator | ( | ) |
Constructs this object with an AverageGuessMemoryModel and checkInterned = true.
Definition at line 51 of file RamUsageEstimator.cs.
Lucene.Net.Util.RamUsageEstimator.RamUsageEstimator | ( | bool | checkInterned | ) |
checkInterned | check if Strings are interned and don't add to size if they are. Defaults to true but if you know the objects you are checking won't likely contain many interned Strings, it will be faster to turn off intern checking. |
Definition at line 60 of file RamUsageEstimator.cs.
Lucene.Net.Util.RamUsageEstimator.RamUsageEstimator | ( | MemoryModel | memoryModel | ) |
memoryModel | MemoryModel to use for primitive object sizes. |
Definition at line 66 of file RamUsageEstimator.cs.
Lucene.Net.Util.RamUsageEstimator.RamUsageEstimator | ( | MemoryModel | memoryModel, |
bool | checkInterned | ||
) |
memoryModel | MemoryModel to use for primitive object sizes. |
checkInterned | check if Strings are interned and don't add to size if they are. Defaults to true but if you know the objects you are checking won't likely contain many interned Strings, it will be faster to turn off intern checking. |
Definition at line 77 of file RamUsageEstimator.cs.
long Lucene.Net.Util.RamUsageEstimator.EstimateRamUsage | ( | System.Object | obj | ) |
Definition at line 89 of file RamUsageEstimator.cs.
|
static |
Return good default units based on byte size.
Definition at line 196 of file RamUsageEstimator.cs.