Class MetricSampler
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler
- Direct Known Subclasses:
MetricsRegistry.AggregatedMetricSampler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static interface
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Runnable
private MetricCategory
private double
private boolean
private String
private DoubleSupplier
(package private) MetricSampler.ThresholdTest
private io.netty.buffer.ByteBuf
private io.netty.buffer.ByteBuf
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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()
-