final long cpuEnd = MEASURE_CPU_TIME ? THREAD_MX_BEAN.getCurrentThreadCpuTime() : 0L;
@@ -476,6 +481,7 @@ public final class TickRegionScheduler {
final FoliaWatchdogThread.RunningTick runningTick = new FoliaWatchdogThread.RunningTick(tickStart, this, Thread.currentThread()); // Folia - region threading
WATCHDOG_THREAD.addTick(runningTick); // Folia - region threading
+ if (this.scheduleProfiler != null) this.scheduleProfiler.tickBegin(); // Shiroha - per region async profiler
try {
// next start isn't updated until the end of this tick
@@ -36,10 +36,12 @@ public final class TickRegions implements ThreadedRegionizer.RegionCallbacks<Tic
private static boolean initialised;
private static boolean started;
private static TickRegionScheduler scheduler;
+ private static final io.nanachiyo0721.shiroha.utils.profiling.RegionScheduleProfilerManager scheduleProfilerManager = new io.nanachiyo0721.shiroha.utils.profiling.RegionScheduleProfilerManager(); // Shiroha - per region async profiler
public static TickRegionScheduler getScheduler() {
return scheduler;
}
+ public static io.nanachiyo0721.shiroha.utils.profiling.RegionScheduleProfilerManager getScheduleProfilerManager() { return scheduleProfilerManager; } // Shiroha - per region async profiler
private static int getTickThreads(final GlobalConfiguration.ThreadedRegions config) {