Class MetricSampler
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler
- Direct Known Subclasses:
MetricsRegistry.AggregatedMetricSampler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Runnableprivate final MetricCategoryprivate doubleprivate booleanprivate final Stringprivate final DoubleSupplier(package private) final MetricSampler.ThresholdTestprivate final io.netty.buffer.ByteBufprivate final io.netty.buffer.ByteBuf -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetricSampler(String p_145996_, MetricCategory p_145997_, DoubleSupplier p_145998_, Runnable p_145999_, MetricSampler.ThresholdTest p_146000_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> MetricSampler.MetricSamplerBuilder<T> builder(String p_146014_, MetricCategory p_146015_, ToDoubleFunction<T> p_146016_, T p_146017_) static MetricSamplercreate(String p_146010_, MetricCategory p_146011_, DoubleSupplier p_146012_) static <T> MetricSamplercreate(String p_146005_, MetricCategory p_146006_, T p_146007_, ToDoubleFunction<T> p_146008_) booleangetName()(package private) DoubleSupplierinthashCode()voidonEndTick(int p_146003_) voidvoidresult()booleanprivate void
-
Field Details
-
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
-
-
Constructor Details
-
MetricSampler
protected MetricSampler(String p_145996_, MetricCategory p_145997_, DoubleSupplier p_145998_, @Nullable Runnable p_145999_, @Nullable MetricSampler.ThresholdTest p_146000_)
-
-
Method Details
-
create
public static MetricSampler create(String p_146010_, MetricCategory p_146011_, DoubleSupplier p_146012_) -
create
public static <T> MetricSampler create(String p_146005_, MetricCategory p_146006_, T p_146007_, ToDoubleFunction<T> p_146008_) -
builder
public static <T> MetricSampler.MetricSamplerBuilder<T> builder(String p_146014_, MetricCategory p_146015_, ToDoubleFunction<T> p_146016_, T p_146017_) -
onStartTick
public void onStartTick() -
onEndTick
public void onEndTick(int p_146003_) -
onFinished
public void onFinished() -
verifyRunning
private void verifyRunning() -
getSampler
DoubleSupplier getSampler() -
getName
-
getCategory
-
result
-
triggersThreshold
public boolean triggersThreshold() -
equals
-
hashCode
public int hashCode()
-