Class ActiveMetricsRecorder
java.lang.Object
net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder
- All Implemented Interfaces:
MetricsRecorder
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final long
private final Map<MetricSampler,
List<RecordedDeviation>> private final Executor
private boolean
private final MetricsPersister
private final MetricsSamplerProvider
private final Consumer<ProfileResults>
static final int
private ProfileCollector
private final ContinuousProfiler
private Set<MetricSampler>
private final LongSupplier
-
Constructor Summary
ModifierConstructorDescriptionprivate
ActiveMetricsRecorder
(MetricsSamplerProvider p_146121_, LongSupplier p_146122_, Executor p_146123_, MetricsPersister p_146124_, Consumer<ProfileResults> p_146125_, Consumer<Path> p_146126_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
private void
cleanup
(Collection<MetricSampler> p_216817_) static ActiveMetricsRecorder
createStarted
(MetricsSamplerProvider p_146133_, LongSupplier p_146134_, Executor p_146135_, MetricsPersister p_146136_, Consumer<ProfileResults> p_146137_, Consumer<Path> p_146138_) void
end()
void
endTick()
boolean
static void
registerGlobalCompletionCallback
(Consumer<Path> p_146143_) private void
scheduleSaveResults
(ProfileResults p_146129_) void
private 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:
end
in interfaceMetricsRecorder
-
cancel
public void cancel()- Specified by:
cancel
in interfaceMetricsRecorder
-
startTick
public void startTick()- Specified by:
startTick
in interfaceMetricsRecorder
-
endTick
public void endTick()- Specified by:
endTick
in interfaceMetricsRecorder
-
isRecording
public boolean isRecording()- Specified by:
isRecording
in interfaceMetricsRecorder
-
getProfiler
- Specified by:
getProfiler
in interfaceMetricsRecorder
-
verifyStarted
private void verifyStarted() -
scheduleSaveResults
-
cleanup
-
registerGlobalCompletionCallback
-