All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.timings.LevelTimings Maven / Gradle / Ivy

Go to download

A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.

There is a newer version: 1.6.0.1-PN
Show newest version
package cn.nukkit.timings;

import cn.nukkit.level.Level;
import co.aikar.timings.Timing;
import co.aikar.timings.TimingsManager;

/**
 * @author Pub4Game
 * @author Tee7even
 */
public class LevelTimings {
    public final Timing doChunkUnload;
    public final Timing doTickPending;
    public final Timing doChunkGC;
    public final Timing doTick;

    public final Timing tickChunks;
    public final Timing entityTick;
    public final Timing blockEntityTick;

    public final Timing syncChunkSendTimer;
    public final Timing syncChunkSendPrepareTimer;
    public final Timing syncChunkLoadTimer;
    public final Timing syncChunkLoadDataTimer;
    public final Timing syncChunkLoadEntitiesTimer;
    public final Timing syncChunkLoadBlockEntitiesTimer;

    public LevelTimings(Level level) {
        String name = level.getFolderName() + " - ";

        this.doChunkUnload = TimingsManager.getTiming(name + "doChunkUnload");
        this.doTickPending = TimingsManager.getTiming(name + "doTickPending");
        this.doChunkGC = TimingsManager.getTiming(name + "doChunkGC");
        this.doTick = TimingsManager.getTiming(name + "doTick");

        this.tickChunks = TimingsManager.getTiming(name + "tickChunks");
        this.entityTick = TimingsManager.getTiming(name + "entityTick");
        this.blockEntityTick = TimingsManager.getTiming(name + "blockEntityTick");

        this.syncChunkSendTimer = TimingsManager.getTiming(name + "syncChunkSend");
        this.syncChunkSendPrepareTimer = TimingsManager.getTiming(name + "syncChunkSendPrepare");
        this.syncChunkLoadTimer = TimingsManager.getTiming(name + "syncChunkLoad");
        this.syncChunkLoadDataTimer = TimingsManager.getTiming(name + "syncChunkLoad - Data");
        this.syncChunkLoadEntitiesTimer = TimingsManager.getTiming(name + "syncChunkLoad - Entities");
        this.syncChunkLoadBlockEntitiesTimer = TimingsManager.getTiming(name + "syncChunkLoad - BlockEntities");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy