Package io.pyroscope.javaagent
Class ProfilingScheduler
java.lang.Object
io.pyroscope.javaagent.ProfilingScheduler
-
Constructor Summary
ConstructorsConstructorDescriptionProfilingScheduler(Config config, io.pyroscope.javaagent.Profiler profiler, io.pyroscope.javaagent.OverfillQueue<io.pyroscope.javaagent.Snapshot> pushQueue) -
Method Summary
Modifier and TypeMethodDescriptionstatic InstantalignProfilingIntervalStartTime(Instant profilingIntervalStartTime, Duration uploadInterval) Aligns profilingIntervalStartTime to the closest aligned upload time either forward or backward For example if upload interval is 10s and profilingIntervalStartTime is 00:00.01 it will return 00:00 and if profilingIntervalStartTime is 00:09.239 it will return 00:10 ...Starts the first profiling interval.
-
Constructor Details
-
ProfilingScheduler
public ProfilingScheduler(Config config, io.pyroscope.javaagent.Profiler profiler, io.pyroscope.javaagent.OverfillQueue<io.pyroscope.javaagent.Snapshot> pushQueue)
-
-
Method Details
-
startFirst
Starts the first profiling interval. profilingIntervalStartTime is set to a current time aligned to upload interval Duration of the first profiling interval will be smaller than uploadInterval for alignment. ...- Returns:
- Duration of the first profiling interval
-
alignProfilingIntervalStartTime
public static Instant alignProfilingIntervalStartTime(Instant profilingIntervalStartTime, Duration uploadInterval) Aligns profilingIntervalStartTime to the closest aligned upload time either forward or backward For example if upload interval is 10s and profilingIntervalStartTime is 00:00.01 it will return 00:00 and if profilingIntervalStartTime is 00:09.239 it will return 00:10 ...- Parameters:
profilingIntervalStartTime- the time to alignuploadInterval-- Returns:
- the aligned
-