Class ProfilerThread
java.lang.Object
org.noise_planet.noisemodelling.pathfinder.utils.profiler.ProfilerThread
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMetric is a collection of statistics to write on the profile csv file -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMetric(ProfilerThread.Metric metric) add this given metric (collection of statistics to write on the profile csv file)<T extends ProfilerThread.Metric>
Tvoidrun()Runs the thread to continuously write metric data to the output file.Runs the thread to continuously write metric data to the output file.voidsetFlushInterval(int flushInterval) voidsetWriteInterval(int writeInterval) voidstop()
-
Field Details
-
log
public org.slf4j.Logger log -
timeTracker
-
-
Constructor Details
-
ProfilerThread
-
-
Method Details
-
addMetric
add this given metric (collection of statistics to write on the profile csv file)- Parameters:
metric-
-
setWriteInterval
public void setWriteInterval(int writeInterval) - Parameters:
writeInterval- In seconds, intervals for writing new metrics in the csv file
-
setFlushInterval
public void setFlushInterval(int flushInterval) - Parameters:
flushInterval- Time in seconds between each effective write on the hard drive
-
run
public void run()Runs the thread to continuously write metric data to the output file.Runs the thread to continuously write metric data to the output file. -
stop
public void stop() -
getMetric
- Type Parameters:
T-- Parameters:
metricClass-- Returns:
-