类 MetricSampler
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler
-
嵌套类概要
嵌套类修饰符和类型类说明static class
static class
static interface
static class
-
字段概要
字段修饰符和类型字段说明private final Runnable
private final MetricCategory
private double
private boolean
private final String
private final DoubleSupplier
(专用程序包) final MetricSampler.ThresholdTest
private final io.netty.buffer.ByteBuf
private final io.netty.buffer.ByteBuf
-
构造器概要
构造器限定符构造器说明protected
MetricSampler
(String pName, MetricCategory pCategory, DoubleSupplier pSampler, Runnable pBeforeTick, MetricSampler.ThresholdTest pThresholdTest) -
方法概要
修饰符和类型方法说明static <T> MetricSampler.MetricSamplerBuilder<T>
builder
(String pName, MetricCategory pCategory, ToDoubleFunction<T> pSampler, T pContext) static MetricSampler
create
(String pName, MetricCategory pCategory, DoubleSupplier pSampler) static <T> MetricSampler
create
(String pName, MetricCategory pCategory, T pContext, ToDoubleFunction<T> pSampler) boolean
getName()
(专用程序包) DoubleSupplier
int
hashCode()
void
onEndTick
(int pTickTime) void
void
result()
boolean
private void
-
字段详细资料
-
name
-
category
-
sampler
-
ticks
private final io.netty.buffer.ByteBuf ticks -
values
private final io.netty.buffer.ByteBuf values -
isRunning
private volatile boolean isRunning -
beforeTick
-
thresholdTest
-
currentValue
private double currentValue
-
-
构造器详细资料
-
MetricSampler
protected MetricSampler(String pName, MetricCategory pCategory, DoubleSupplier pSampler, @Nullable Runnable pBeforeTick, @Nullable MetricSampler.ThresholdTest pThresholdTest)
-
-
方法详细资料
-
create
-
create
public static <T> MetricSampler create(String pName, MetricCategory pCategory, T pContext, ToDoubleFunction<T> pSampler) -
builder
public static <T> MetricSampler.MetricSamplerBuilder<T> builder(String pName, MetricCategory pCategory, ToDoubleFunction<T> pSampler, T pContext) -
onStartTick
public void onStartTick() -
onEndTick
public void onEndTick(int pTickTime) -
onFinished
public void onFinished() -
verifyRunning
private void verifyRunning() -
getSampler
DoubleSupplier getSampler() -
getName
-
getCategory
-
result
-
triggersThreshold
public boolean triggersThreshold() -
equals
-
hashCode
public int hashCode()
-