Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Threading.PortableThreadPool.HillClimbing Class Referencesealed

Classes

struct  Complex
 
struct  LogEntry
 

Public Types

enum  StateOrTransition {
  Warmup , Initializing , RandomMove , ClimbingMove ,
  ChangePoint , Stabilizing , Starvation , ThreadTimedOut ,
  CooperativeBlocking
}
 

Public Member Functions

 HillClimbing ()
 
int int newSampleMs Update (int currentThreadCount, double sampleDurationSeconds, int numCompletions)
 
void ForceChange (int newThreadCount, StateOrTransition state)
 

Public Attributes

int newThreadCount
 

Static Public Attributes

static readonly bool IsDisabled = AppContextConfigHelper.GetBooleanConfig("System.Threading.ThreadPool.HillClimbing.Disable", defaultValue: false)
 
static readonly HillClimbing ThreadPoolHillClimber = new HillClimbing()
 

Private Member Functions

void ChangeThreadCount (int newThreadCount, StateOrTransition state)
 
void LogTransition (int newThreadCount, double throughput, StateOrTransition stateOrTransition)
 
Complex GetWaveComponent (double[] samples, int numSamples, double period)
 

Private Attributes

readonly int _wavePeriod
 
readonly int _samplesToMeasure
 
readonly double _targetThroughputRatio
 
readonly double _targetSignalToNoiseRatio
 
readonly double _maxChangePerSecond
 
readonly double _maxChangePerSample
 
readonly int _maxThreadWaveMagnitude
 
readonly int _sampleIntervalMsLow
 
readonly double _threadMagnitudeMultiplier
 
readonly int _sampleIntervalMsHigh
 
readonly double _throughputErrorSmoothingFactor
 
readonly double _gainExponent
 
readonly double _maxSampleError
 
double _currentControlSetting
 
long _totalSamples
 
int _lastThreadCount
 
double _averageThroughputNoise
 
double _secondsElapsedSinceLastChange
 
double _completionsSinceLastChange
 
int _accumulatedCompletionCount
 
double _accumulatedSampleDurationSeconds
 
readonly double[] _samples
 
readonly double[] _threadCounts
 
int _currentSampleMs
 
readonly Random _randomIntervalGenerator = new Random()
 
readonly LogEntry[] _log = new LogEntry[200]
 
int _logStart
 
int _logSize
 

Detailed Description

Definition at line 323 of file PortableThreadPool.cs.


The documentation for this class was generated from the following file: