Class ActiveMetricsRecorder
java.lang.Object
net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder
- All Implemented Interfaces:
MetricsRecorder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final longprivate final Map<MetricSampler,List<RecordedDeviation>> private final Executorprivate booleanprivate final MetricsPersisterprivate final MetricsSamplerProviderprivate final Consumer<ProfileResults>static final intprivate ProfileCollectorprivate final ContinuousProfilerprivate Set<MetricSampler>private final LongSupplier -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateActiveMetricsRecorder(MetricsSamplerProvider p_146121_, LongSupplier p_146122_, Executor p_146123_, MetricsPersister p_146124_, Consumer<ProfileResults> p_146125_, Consumer<Path> p_146126_) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()private voidcleanup(Collection<MetricSampler> p_216817_) static ActiveMetricsRecordercreateStarted(MetricsSamplerProvider p_146133_, LongSupplier p_146134_, Executor p_146135_, MetricsPersister p_146136_, Consumer<ProfileResults> p_146137_, Consumer<Path> p_146138_) voidend()voidendTick()booleanstatic voidregisterGlobalCompletionCallback(Consumer<Path> p_146143_) private voidscheduleSaveResults(ProfileResults p_146129_) voidprivate void
-
Field Details
-
PROFILING_MAX_DURATION_SECONDS
public static final int PROFILING_MAX_DURATION_SECONDS- See Also:
-
globalOnReportFinished
-
deviationsBySampler
-
taskProfiler
-
ioExecutor
-
metricsPersister
-
onProfilingEnd
-
onReportFinished
-
metricsSamplerProvider
-
wallTimeSource
-
deadlineNano
private final long deadlineNano -
currentTick
private int currentTick -
singleTickProfiler
-
killSwitch
private volatile boolean killSwitch -
thisTickSamplers
-
-
Constructor Details
-
ActiveMetricsRecorder
private ActiveMetricsRecorder(MetricsSamplerProvider p_146121_, LongSupplier p_146122_, Executor p_146123_, MetricsPersister p_146124_, Consumer<ProfileResults> p_146125_, Consumer<Path> p_146126_)
-
-
Method Details
-
createStarted
public static ActiveMetricsRecorder createStarted(MetricsSamplerProvider p_146133_, LongSupplier p_146134_, Executor p_146135_, MetricsPersister p_146136_, Consumer<ProfileResults> p_146137_, Consumer<Path> p_146138_) -
end
public void end()- Specified by:
endin interfaceMetricsRecorder
-
cancel
public void cancel()- Specified by:
cancelin interfaceMetricsRecorder
-
startTick
public void startTick()- Specified by:
startTickin interfaceMetricsRecorder
-
endTick
public void endTick()- Specified by:
endTickin interfaceMetricsRecorder
-
isRecording
public boolean isRecording()- Specified by:
isRecordingin interfaceMetricsRecorder
-
getProfiler
- Specified by:
getProfilerin interfaceMetricsRecorder
-
verifyStarted
private void verifyStarted() -
scheduleSaveResults
-
cleanup
-
registerGlobalCompletionCallback
-