Skip to main content

RecyclableMemoryStreamManager.Events

ETW events for RecyclableMemoryStream

Assembly: ServiceStack.Text.dll
View Source
Declaration
public sealed class Events : EventSource

Fields

Writer

Static log object, through which all events are written.

View Source
Declaration
public static RecyclableMemoryStreamManager.Events Writer

Methods

MemoryStreamCreated(Guid, String, Int32)

Logged when a stream object is created.

View Source
Declaration
[Event(1, Level = EventLevel.Verbose)]
public void MemoryStreamCreated(Guid guid, string tag, int requestedSize)
Parameters
TypeNameDescription
System.GuidguidA unique ID for this stream.

| | System.String | tag | A temporary ID for this stream, usually indicates current usage.

| | System.Int32 | requestedSize | Requested size of the stream

|

MemoryStreamDisposed(Guid, String)

Logged when the stream is disposed

View Source
Declaration
[Event(2, Level = EventLevel.Verbose)]
public void MemoryStreamDisposed(Guid guid, string tag)
Parameters
TypeNameDescription
System.GuidguidA unique ID for this stream.

| | System.String | tag | A temporary ID for this stream, usually indicates current usage.

|

MemoryStreamDoubleDispose(Guid, String, String, String, String)

Logged when the stream is disposed for the second time.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.

View Source
Declaration
[Event(3, Level = EventLevel.Critical)]
public void MemoryStreamDoubleDispose(Guid guid, string tag, string allocationStack, string disposeStack1, string disposeStack2)
Parameters
TypeNameDescription
System.GuidguidA unique ID for this stream.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | tag | A temporary ID for this stream, usually indicates current usage. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | allocationStack | Call stack of initial allocation. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | disposeStack1 | Call stack of the first dispose. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | disposeStack2 | Call stack of the second dispose. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. |

MemoryStreamFinalized(Guid, String, String)

Logged when a stream is finalized.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.

View Source
Declaration
[Event(4, Level = EventLevel.Error)]
public void MemoryStreamFinalized(Guid guid, string tag, string allocationStack)
Parameters
TypeNameDescription
System.GuidguidA unique ID for this stream.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | tag | A temporary ID for this stream, usually indicates current usage. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | allocationStack | Call stack of initial allocation. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. |

MemoryStreamToArray(Guid, String, String, Int32)

Logged when ToArray is called on a stream.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.

View Source
Declaration
[Event(5, Level = EventLevel.Verbose)]
public void MemoryStreamToArray(Guid guid, string tag, string stack, int size)
Parameters
TypeNameDescription
System.GuidguidA unique ID for this stream.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | tag | A temporary ID for this stream, usually indicates current usage. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | stack | Call stack of the ToArray call. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.Int32 | size | Length of stream Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. |

MemoryStreamManagerInitialized(Int32, Int32, Int32)

Logged when the RecyclableMemoryStreamManager is initialized.

View Source
Declaration
[Event(6, Level = EventLevel.Informational)]
public void MemoryStreamManagerInitialized(int blockSize, int largeBufferMultiple, int maximumBufferSize)
Parameters
TypeNameDescription
System.Int32blockSizeSize of blocks, in bytes.

| | System.Int32 | largeBufferMultiple | Size of the large buffer multiple, in bytes.

| | System.Int32 | maximumBufferSize | Maximum buffer size, in bytes.

|

MemoryStreamNewBlockCreated(Int64)

Logged when a new block is created.

View Source
Declaration
[Event(7, Level = EventLevel.Verbose)]
public void MemoryStreamNewBlockCreated(long smallPoolInUseBytes)
Parameters
TypeNameDescription
System.Int64smallPoolInUseBytesNumber of bytes in the small pool currently in use.

|

MemoryStreamNewLargeBufferCreated(Int32, Int64)

Logged when a new large buffer is created.

View Source
Declaration
[Event(8, Level = EventLevel.Verbose)]
public void MemoryStreamNewLargeBufferCreated(int requiredSize, long largePoolInUseBytes)
Parameters
TypeNameDescription
System.Int32requiredSizeRequested size

| | System.Int64 | largePoolInUseBytes | Number of bytes in the large pool in use.

|

MemoryStreamNonPooledLargeBufferCreated(Int32, String, String)

Logged when a buffer is created that is too large to pool.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.

View Source
Declaration
[Event(9, Level = EventLevel.Verbose)]
public void MemoryStreamNonPooledLargeBufferCreated(int requiredSize, string tag, string allocationStack)
Parameters
TypeNameDescription
System.Int32requiredSizeSize requested by the caller

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | tag | A temporary ID for this stream, usually indicates current usage. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | allocationStack | Call stack of the requested stream. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. |

MemoryStreamDiscardBuffer(RecyclableMemoryStreamManager.Events.MemoryStreamBufferType, String, RecyclableMemoryStreamManager.Events.MemoryStreamDiscardReason)

Logged when a buffer is discarded (not put back in the pool, but given to GC to clean up).

View Source
Declaration
[Event(10, Level = EventLevel.Warning)]
public void MemoryStreamDiscardBuffer(RecyclableMemoryStreamManager.Events.MemoryStreamBufferType bufferType, string tag, RecyclableMemoryStreamManager.Events.MemoryStreamDiscardReason reason)
Parameters
TypeNameDescription
ServiceStack.Text.RecyclableMemoryStreamManager.Events.MemoryStreamBufferTypebufferTypeType of the buffer being discarded.

| | System.String | tag | A temporary ID for this stream, usually indicates current usage.

| | ServiceStack.Text.RecyclableMemoryStreamManager.Events.MemoryStreamDiscardReason | reason | Reason for the discard.

|

MemoryStreamOverCapacity(Int32, Int64, String, String)

Logged when a stream grows beyond the maximum capacity.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.

View Source
Declaration
[Event(11, Level = EventLevel.Error)]
public void MemoryStreamOverCapacity(int requestedCapacity, long maxCapacity, string tag, string allocationStack)
Parameters
TypeNameDescription
System.Int32requestedCapacityThe requested capacity.

Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.Int64 | maxCapacity | Maximum capacity, as configured by RecyclableMemoryStreamManager. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | tag | A temporary ID for this stream, usually indicates current usage. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. | | System.String | allocationStack | Call stack for the capacity request. Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true. |

Inherited Methods

IsEnabled()

View Source
Declaration
public bool IsEnabled()
Returns

System.Boolean

IsEnabled(EventLevel, EventKeywords)

View Source
Declaration
public bool IsEnabled(EventLevel level, EventKeywords keywords)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Text.EventLevellevel
ServiceStack.Text.EventKeywordskeywords

WriteEvent(Object[])

View Source
Declaration
public void WriteEvent(params object[] unused)
Parameters
TypeName
System.Object[]unused