Add some debug logging

This commit is contained in:
Lukas Rieger (Blue) 2024-08-18 10:27:50 +02:00
parent b422640a76
commit 61b003b7a9
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
2 changed files with 7 additions and 0 deletions

View File

@ -188,6 +188,9 @@ public void doWork() {
private void processTile(int x, int z) {
Vector2i tile = new Vector2i(tileMin.getX() + x, tileMin.getY() + z);
Logger.global.logInfo("[%s] Processing tile %s".formatted(Thread.currentThread().getName(), tile));
ActionAndNextState action = tileActions[tileIndex(x, z)];
TileState resultState = TileState.RENDER_ERROR;

View File

@ -133,6 +133,8 @@ public BmMap(String id, String name, World world, MapStorage storage, ResourcePa
public void renderTile(Vector2i tile) {
if (!tileFilter.test(tile)) return;
Logger.global.logInfo("[%s] Start rendering tile %s".formatted(Thread.currentThread().getName(), tile));
long start = System.nanoTime();
hiresModelManager.render(world, tile, lowresTileManager, mapSettings.isSaveHiresLayer());
@ -140,6 +142,8 @@ public void renderTile(Vector2i tile) {
long end = System.nanoTime();
long delta = end - start;
Logger.global.logInfo("[%s] Finished rendering tile %s in %d nanoseconds".formatted(Thread.currentThread().getName(), tile, delta));
renderTimeSumNanos += delta;
tilesRendered ++;
}