Class MetricSampler
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler
- Direct Known Subclasses:
MetricsRegistry.AggregatedMetricSampler
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static interface
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Runnable
private final MetricCategory
private double
private boolean
private final String
private final DoubleSupplier
(package private) final MetricSampler.ThresholdTest
private final io.netty.buffer.ByteBuf
private final io.netty.buffer.ByteBuf
-
Constructor Summary
ModifierConstructorDescriptionprotected
MetricSampler
(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 MetricSampler
create
(String p_146010_, MetricCategory p_146011_, DoubleSupplier p_146012_) static <T> MetricSampler
create
(String p_146005_, MetricCategory p_146006_, T p_146007_, ToDoubleFunction<T> p_146008_) boolean
getName()
(package private) DoubleSupplier
int
hashCode()
void
onEndTick
(int p_146003_) void
void
result()
boolean
private 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()
-