Class MetricSampler
java.lang.Object
net.minecraft.util.profiling.metrics.MetricSampler
- Direct Known Subclasses:
- MetricsRegistry.AggregatedMetricSampler
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic class
- 
Field SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionprotectedMetricSampler(String p_145996_, MetricCategory p_145997_, DoubleSupplier p_145998_, Runnable p_145999_, MetricSampler.ThresholdTest p_146000_) 
- 
Method SummaryModifier 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
- 
ticksprivate final io.netty.buffer.ByteBuf ticks
- 
valuesprivate final io.netty.buffer.ByteBuf values
- 
isRunningprivate volatile boolean isRunning
- 
beforeTick
- 
thresholdTest
- 
currentValueprivate double currentValue
 
- 
- 
Constructor Details- 
MetricSamplerprotected MetricSampler(String p_145996_, MetricCategory p_145997_, DoubleSupplier p_145998_, @Nullable Runnable p_145999_, @Nullable MetricSampler.ThresholdTest p_146000_) 
 
- 
- 
Method Details- 
createpublic static MetricSampler create(String p_146010_, MetricCategory p_146011_, DoubleSupplier p_146012_) 
- 
createpublic static <T> MetricSampler create(String p_146005_, MetricCategory p_146006_, T p_146007_, ToDoubleFunction<T> p_146008_) 
- 
builderpublic static <T> MetricSampler.MetricSamplerBuilder<T> builder(String p_146014_, MetricCategory p_146015_, ToDoubleFunction<T> p_146016_, T p_146017_) 
- 
onStartTickpublic void onStartTick()
- 
onEndTickpublic void onEndTick(int p_146003_) 
- 
onFinishedpublic void onFinished()
- 
verifyRunningprivate void verifyRunning()
- 
getSamplerDoubleSupplier getSampler()
- 
getName
- 
getCategory
- 
result
- 
triggersThresholdpublic boolean triggersThreshold()
- 
equals
- 
hashCodepublic int hashCode()
 
-