net.minecraft.util.profiler

public class Sampler

net.minecraft.util.profiling.metrics.MetricSampler
net.minecraft.class_5965
net.minecraft.util.profiler.Sampler

Field summary

Modifier and TypeField
private final String
name
field_33882
name
private final Sampler$Stage
samplingPhase
field_1_5771
stage
private final SampleType
category
field_29598
type
private final DoubleSupplier
sampler
field_29599
retriever
private final io.netty.buffer.ByteBuf
ticks
field_33883
ticksBuffer
private final io.netty.buffer.ByteBuf
values
field_29600
valueBuffer
private volatile boolean
isRunning
field_29601
active
private final Runnable
beforeTick
field_29602
startAction
final Sampler$DeviationChecker
thresholdTest
field_29603
deviationChecker
private double
currentValue
field_33884
currentSample

Constructor summary

ModifierConstructor
protected (String name, Sampler$Stage stage, SampleType type, DoubleSupplier retriever, Runnable startAction, Sampler$DeviationChecker deviationChecker)

Method summary

Modifier and TypeMethod
public static Sampler
create(String name, MetricCategory category, DoubleSupplier sampler)
method_34776(String arg0, class_5949 arg1, DoubleSupplier arg2)
endTick(String name, SampleType type, DoubleSupplier retriever)
public static Sampler
createExtractSampler(String name, MetricCategory category, DoubleSupplier sampler)
method_34778(String arg0, class_5949 arg1, DoubleSupplier arg2)
extract(String name, SampleType type, DoubleSupplier retriever)
public static <T> Sampler$Builder<T>
builder(String metricName, MetricCategory category, ToDoubleFunction<T> sampler, T context)
method_34779(String arg0, class_5949 arg1, ToDoubleFunction<T> arg2, T arg3)
builder(String name, SampleType type, ToDoubleFunction<T> retriever, T context)
public void
onStartTick()
method_34780()
start()
public void
onEndTick(int currentTick)
method_34781(int arg0)
sample(int tick)
public void
onFinished()
method_34782()
stop()
private void
verifyRunning()
method_34786()
ensureActive()
public DoubleSupplier
getSampler()
method_37170()
getRetriever()
public String
getName()
method_37171()
getName()
public Sampler$Stage
samplingPhase()
method_1_4983()
getStage()
public SampleType
getCategory()
method_37172()
getType()
public Sampler$Data
result()
method_37173()
collectData()
public boolean
triggersThreshold()
method_37174()
hasDeviated()