Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AggregationManager()

System.Diagnostics.Metrics.AggregationManager.AggregationManager ( int maxTimeSeries,
int maxHistograms,
Action< Instrument, LabeledAggregationStatistics > collectMeasurement,
Action< DateTime, DateTime > beginCollection,
Action< DateTime, DateTime > endCollection,
Action< Instrument > beginInstrumentMeasurements,
Action< Instrument > endInstrumentMeasurements,
Action< Instrument > instrumentPublished,
Action initialInstrumentEnumerationComplete,
Action< Exception > collectionError,
Action timeSeriesLimitReached,
Action histogramLimitReached,
Action< Exception > observableInstrumentCallbackError )
inline

Definition at line 55 of file AggregationManager.cs.

56 {
70 _listener = new MeterListener
71 {
72 InstrumentPublished = delegate(Instrument instrument, MeterListener listener)
73 {
76 if (instrumentState != null)
77 {
79 listener.EnableMeasurementEvents(instrument, instrumentState);
80 }
81 },
82 MeasurementsCompleted = delegate(Instrument instrument, object cookie)
83 {
86 }
87 };
88 _listener.SetMeasurementEventCallback(delegate(Instrument i, double m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
89 {
90 ((InstrumentState)c).Update(m, l);
91 });
92 _listener.SetMeasurementEventCallback(delegate(Instrument i, float m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
93 {
94 ((InstrumentState)c).Update(m, l);
95 });
96 _listener.SetMeasurementEventCallback(delegate(Instrument i, long m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
97 {
98 ((InstrumentState)c).Update(m, l);
99 });
100 _listener.SetMeasurementEventCallback(delegate(Instrument i, int m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
101 {
102 ((InstrumentState)c).Update(m, l);
103 });
104 _listener.SetMeasurementEventCallback(delegate(Instrument i, short m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
105 {
106 ((InstrumentState)c).Update(m, l);
107 });
108 _listener.SetMeasurementEventCallback(delegate(Instrument i, byte m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
109 {
110 ((InstrumentState)c).Update((int)m, l);
111 });
112 _listener.SetMeasurementEventCallback(delegate(Instrument i, decimal m, ReadOnlySpan<KeyValuePair<string, object>> l, object c)
113 {
114 ((InstrumentState)c).Update((double)m, l);
115 });
116 }
void RemoveInstrumentState(Instrument instrument, InstrumentState state)
readonly Action< Instrument > _instrumentPublished
readonly Action< Instrument > _beginInstrumentMeasurements
readonly Action< DateTime, DateTime > _endCollection
readonly Action< DateTime, DateTime > _beginCollection
InstrumentState GetInstrumentState(Instrument instrument)
readonly Action< Instrument, LabeledAggregationStatistics > _collectMeasurement
readonly Action< Exception > _observableInstrumentCallbackError
readonly Action< Instrument > _endInstrumentMeasurements

References System.Diagnostics.Metrics.AggregationManager._beginCollection, System.Diagnostics.Metrics.AggregationManager._beginInstrumentMeasurements, System.Diagnostics.Metrics.AggregationManager._collectionError, System.Diagnostics.Metrics.AggregationManager._collectMeasurement, System.Diagnostics.Metrics.AggregationManager._endCollection, System.Diagnostics.Metrics.AggregationManager._endInstrumentMeasurements, System.Diagnostics.Metrics.AggregationManager._histogramLimitReached, System.Diagnostics.Metrics.AggregationManager._initialInstrumentEnumerationComplete, System.Diagnostics.Metrics.AggregationManager._instrumentPublished, System.Diagnostics.Metrics.AggregationManager._listener, System.Diagnostics.Metrics.AggregationManager._maxHistograms, System.Diagnostics.Metrics.AggregationManager._maxTimeSeries, System.Diagnostics.Metrics.AggregationManager._observableInstrumentCallbackError, System.Diagnostics.Metrics.AggregationManager._timeSeriesLimitReached, System.Diagnostics.Metrics.MeterListener.EnableMeasurementEvents(), System.Diagnostics.Metrics.AggregationManager.GetInstrumentState(), and System.Diagnostics.Metrics.AggregationManager.RemoveInstrumentState().