Struct LogMemoryManagerParameters
Initialization parameters for LogMemoryManager.
Inherited Members
Namespace: Unity.Logging
Syntax
[BurstCompile]
[GenerateTestsForBurstCompatibility]
public struct LogMemoryManagerParameters
Fields
BufferGrowFactor
Factor by which the default Payload container increases in size, when growth threshold is reached.
Declaration
public float BufferGrowFactor
Field Value
Type | Description |
---|---|
Single |
BufferGrowThreshold
Default Payload container capacity will increase in size when the average usage goes over this ratio.
Declaration
public float BufferGrowThreshold
Field Value
Type | Description |
---|---|
Single |
Remarks
Setting to 0 will disable dynamic "growing" operations; Payload containers may shrink in size but won't automatically grow.
BufferSampleCount
Number of samples used for computing moving average of default Payload container capacity.
Declaration
public uint BufferSampleCount
Field Value
Type | Description |
---|---|
UInt32 |
Remarks
Setting this to 0 will disable all dynamic resizing operations.
BufferShrinkFactor
Factor by which the default Payload container decreases in size, when shrink threshold is reached.
Declaration
public float BufferShrinkFactor
Field Value
Type | Description |
---|---|
Single |
BufferShrinkThreshold
Default Payload container capacity will decrease in size when the average usage goes below this ratio.
Declaration
public float BufferShrinkThreshold
Field Value
Type | Description |
---|---|
Single |
Remarks
Setting to 0 will disable dynamic "shrinking" operations; Payload containers may grow in size but won't automatically shrink.
DefaultBufferCapacity
Default value for InitialBufferCapacity
Declaration
public const uint DefaultBufferCapacity = 65536U
Field Value
Type | Description |
---|---|
UInt32 |
DefaultBufferGrowFactor
Default value for BufferGrowFactor
Declaration
public const float DefaultBufferGrowFactor = 2F
Field Value
Type | Description |
---|---|
Single |
DefaultBufferGrowThreshold
Default value for BufferGrowThreshold
Declaration
public const float DefaultBufferGrowThreshold = 0.7F
Field Value
Type | Description |
---|---|
Single |
DefaultBufferSampleCount
Default value for BufferSampleCount
Declaration
public const uint DefaultBufferSampleCount = 60U
Field Value
Type | Description |
---|---|
UInt32 |
DefaultBufferShrinkFactor
Default value for BufferShrinkFactor
Declaration
public const float DefaultBufferShrinkFactor = 0.85F
Field Value
Type | Description |
---|---|
Single |
DefaultBufferShrinkThreshold
Default value for BufferShrinkThreshold
Declaration
public const float DefaultBufferShrinkThreshold = 0F
Field Value
Type | Description |
---|---|
Single |
DefaultDispatchQueueSize
Default value for DispatchQueueSize
Declaration
public const int DefaultDispatchQueueSize = 16384
Field Value
Type | Description |
---|---|
Int32 |
DefaultOverflowBufferSize
Default value for OverflowBufferSize
Declaration
public const uint DefaultOverflowBufferSize = 163840U
Field Value
Type | Description |
---|---|
UInt32 |
DispatchQueueSize
Max count of Log messages between updates. DispatchQueue
Declaration
public int DispatchQueueSize
Field Value
Type | Description |
---|---|
Int32 |
InitialBufferCapacity
Starting size of the default Payload container.
Declaration
public uint InitialBufferCapacity
Field Value
Type | Description |
---|---|
UInt32 |
OverflowBufferSize
Size of the "overflow" buffer, which is another UnsafePayloadRingBuffer instance, to hold allocations if the default buffer becomes full.
Declaration
public uint OverflowBufferSize
Field Value
Type | Description |
---|---|
UInt32 |
Remarks
The overflow buffer is never resized and always holds this allocated memory throughout MemoryManager's lifetime, regardless if it's used or not. The purpose is to safeguard against the default buffer filling up before it can be resized. Set this value to 0 to disable use of the overflow buffer.
Properties
Default
Get default settings
Declaration
public static readonly LogMemoryManagerParameters Default { get; }
Property Value
Type | Description |
---|---|
LogMemoryManagerParameters |
HeavyLoad
Get heavy load settings
Declaration
public static readonly LogMemoryManagerParameters HeavyLoad { get; }
Property Value
Type | Description |
---|---|
LogMemoryManagerParameters |
IsAutomaticBufferGrowthEnabled
Returns if automatic Payload container growth is specifically enabled.
Declaration
public readonly bool IsAutomaticBufferGrowthEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsAutomaticBufferResizeEnabled
Returns if automatic Payload container resizing is enabled at all.
Declaration
public readonly bool IsAutomaticBufferResizeEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsAutomaticBufferShrinkEnabled
Returns if automatic Payload container shrink is specifically enabled.
Declaration
public readonly bool IsAutomaticBufferShrinkEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsOverflowBufferEnabled
True if Overflow Buffer is used (its size > 0). OverflowBufferSize
Declaration
public readonly bool IsOverflowBufferEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetDefaultParameters(out LogMemoryManagerParameters)
Creates a LogMemoryManagerParameters instance holding default values.
Declaration
public static void GetDefaultParameters(out LogMemoryManagerParameters defaultParams)
Parameters
Type | Name | Description |
---|---|---|
LogMemoryManagerParameters | defaultParams | Returned instance |
GetHeavyLoadParameters(out LogMemoryManagerParameters)
Creates a LogMemoryManagerParameters instance holding heavy-load-case values.
Declaration
public static void GetHeavyLoadParameters(out LogMemoryManagerParameters defaultParams)
Parameters
Type | Name | Description |
---|---|---|
LogMemoryManagerParameters | defaultParams | Returned instance |