RecyclableMemoryStreamManager.Events
ETW events for RecyclableMemoryStream
Assembly: ServiceStack.Text.dll
View Source
public sealed class Events : EventSource
Fields
Writer
Static log object, through which all events are written.
View Source
public static RecyclableMemoryStreamManager.Events Writer
Methods
MemoryStreamCreated(Guid, String, Int32)
Logged when a stream object is created.
View Source
[Event(1, Level = EventLevel.Verbose)]
public void MemoryStreamCreated(Guid guid, string tag, int requestedSize)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | A 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
[Event(2, Level = EventLevel.Verbose)]
public void MemoryStreamDisposed(Guid guid, string tag)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | A 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
[Event(3, Level = EventLevel.Critical)]
public void MemoryStreamDoubleDispose(Guid guid, string tag, string allocationStack, string disposeStack1, string disposeStack2)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | A 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
[Event(4, Level = EventLevel.Error)]
public void MemoryStreamFinalized(Guid guid, string tag, string allocationStack)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | A 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
[Event(5, Level = EventLevel.Verbose)]
public void MemoryStreamToArray(Guid guid, string tag, string stack, int size)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | guid | A 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
[Event(6, Level = EventLevel.Informational)]
public void MemoryStreamManagerInitialized(int blockSize, int largeBufferMultiple, int maximumBufferSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | blockSize | Size 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
[Event(7, Level = EventLevel.Verbose)]
public void MemoryStreamNewBlockCreated(long smallPoolInUseBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | smallPoolInUseBytes | Number of bytes in the small pool currently in use. |
|
MemoryStreamNewLargeBufferCreated(Int32, Int64)
Logged when a new large buffer is created.
View Source
[Event(8, Level = EventLevel.Verbose)]
public void MemoryStreamNewLargeBufferCreated(int requiredSize, long largePoolInUseBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | requiredSize | Requested 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
[Event(9, Level = EventLevel.Verbose)]
public void MemoryStreamNonPooledLargeBufferCreated(int requiredSize, string tag, string allocationStack)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | requiredSize | Size 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
[Event(10, Level = EventLevel.Warning)]
public void MemoryStreamDiscardBuffer(RecyclableMemoryStreamManager.Events.MemoryStreamBufferType bufferType, string tag, RecyclableMemoryStreamManager.Events.MemoryStreamDiscardReason reason)
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.Text.RecyclableMemoryStreamManager.Events.MemoryStreamBufferType | bufferType | Type 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
[Event(11, Level = EventLevel.Error)]
public void MemoryStreamOverCapacity(int requestedCapacity, long maxCapacity, string tag, string allocationStack)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | requestedCapacity | The 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
public bool IsEnabled()
Returns
System.Boolean
IsEnabled(EventLevel, EventKeywords)
View Source
public bool IsEnabled(EventLevel level, EventKeywords keywords)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Text.EventLevel | level |
ServiceStack.Text.EventKeywords | keywords |
WriteEvent(Object[])
View Source
public void WriteEvent(params object[] unused)
Parameters
Type | Name |
---|---|
System.Object[] | unused |