@@ -172,10 +172,10 @@ public void MemoryStreamManagerInitialized(int blockSize, int largeBufferMultipl
172172 /// Logged when a new block is created.
173173 /// </summary>
174174 /// <param name="smallPoolInUseBytes">Number of bytes in the small pool currently in use.</param>
175- [ Event ( 7 , Level = EventLevel . Verbose ) ]
175+ [ Event ( 7 , Level = EventLevel . Warning , Version = 2 ) ]
176176 public void MemoryStreamNewBlockCreated ( long smallPoolInUseBytes )
177177 {
178- if ( this . IsEnabled ( EventLevel . Verbose , EventKeywords . None ) )
178+ if ( this . IsEnabled ( EventLevel . Warning , EventKeywords . None ) )
179179 {
180180 WriteEvent ( 7 , smallPoolInUseBytes ) ;
181181 }
@@ -186,10 +186,10 @@ public void MemoryStreamNewBlockCreated(long smallPoolInUseBytes)
186186 /// </summary>
187187 /// <param name="requiredSize">Requested size.</param>
188188 /// <param name="largePoolInUseBytes">Number of bytes in the large pool in use.</param>
189- [ Event ( 8 , Level = EventLevel . Verbose , Version = 2 ) ]
189+ [ Event ( 8 , Level = EventLevel . Warning , Version = 3 ) ]
190190 public void MemoryStreamNewLargeBufferCreated ( long requiredSize , long largePoolInUseBytes )
191191 {
192- if ( this . IsEnabled ( EventLevel . Verbose , EventKeywords . None ) )
192+ if ( this . IsEnabled ( EventLevel . Warning , EventKeywords . None ) )
193193 {
194194 WriteEvent ( 8 , requiredSize , largePoolInUseBytes ) ;
195195 }
@@ -219,13 +219,19 @@ public void MemoryStreamNonPooledLargeBufferCreated(Guid guid, string tag, long
219219 /// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
220220 /// <param name="bufferType">Type of the buffer being discarded.</param>
221221 /// <param name="reason">Reason for the discard.</param>
222+ /// <param name="smallBlocksFree">Number of free small pool blocks.</param>
223+ /// <param name="smallPoolBytesFree">Bytes free in the small pool.</param>
224+ /// <param name="smallPoolBytesInUse">Bytes in use from the small pool.</param>
225+ /// <param name="largeBlocksFree">Number of free large pool blocks.</param>
226+ /// <param name="largePoolBytesFree">Bytes free in the large pool.</param>
227+ /// <param name="largePoolBytesInUse">Bytes in use from the large pool.</param>
222228 [ Event ( 10 , Level = EventLevel . Warning , Version = 2 ) ]
223229 public void MemoryStreamDiscardBuffer ( Guid guid , string tag , MemoryStreamBufferType bufferType ,
224- MemoryStreamDiscardReason reason )
230+ MemoryStreamDiscardReason reason , long smallBlocksFree , long smallPoolBytesFree , long smallPoolBytesInUse , long largeBlocksFree , long largePoolBytesFree , long largePoolBytesInUse )
225231 {
226- if ( this . IsEnabled ( ) )
232+ if ( this . IsEnabled ( EventLevel . Warning , EventKeywords . None ) )
227233 {
228- WriteEvent ( 10 , guid , tag ?? string . Empty , bufferType , reason ) ;
234+ WriteEvent ( 10 , guid , tag ?? string . Empty , bufferType , reason , smallBlocksFree , smallPoolBytesFree , smallPoolBytesInUse , largeBlocksFree , largePoolBytesFree , largePoolBytesInUse ) ;
229235 }
230236 }
231237
0 commit comments