Skip to content

Commit

Permalink
Add some debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Aug 18, 2024
1 parent b422640 commit 61b003b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,17 @@ 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());

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 ++;
}
Expand Down

0 comments on commit 61b003b

Please sign in to comment.