CSharpTest.Net
CallsPerSecondCounter Constructor(Int32,Int32)
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Threading Namespace > CallsPerSecondCounter Class > CallsPerSecondCounter Constructor : CallsPerSecondCounter Constructor(Int32,Int32)

sampleSize
sampleFreq

Glossary Item Box

Creates a CallsPerSecondCounter with a specified sample size and freqency of collection. A reasonable sample size is 100, although even as low as 25 will often yeild reasonable results. The higher the sample size, the longer it takes for Value to drop to zero, for a sample size of 100 the counter value will reach zero aprox 50 seconds after the last activity. The sampleFreq defines how often a sample is taken, for instance a value of 5 means to collect a sample only every 5th call to Increment() whereas a value of 1 will collect on every call. For high sampling rates this value can be increased to improve accuracy; however, it will also multiply the warm-up and cool-down time required for the Value property to move off of zero or move to zero.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal sampleSize As Integer, _
   ByVal sampleFreq As Integer _
)
C# 
public CallsPerSecondCounter( 
   int sampleSize,
   int sampleFreq
)

Parameters

sampleSize
sampleFreq

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys