Gather data

This commit is contained in:
mike
2026-01-10 01:05:11 +01:00
parent a444f943b9
commit cc0191f494
3 changed files with 5 additions and 6 deletions

View File

@@ -35,6 +35,7 @@ public record SwedishGenerator(Rng rng) {
//@formatter:off
@FunctionalInterface interface SlotVisitor { void visit(int key, long packedPos, int len); }
//@formatter:on
static final int LOG_EVERY_MS = 200;
static final int BAR_LEN = 22;
static final int C = Config.PUZZLE_COLS;
static final double CROSS_R = (C - 1) / 2.0;
@@ -751,7 +752,7 @@ public record SwedishGenerator(Rng rng) {
record CSP(Rng rng) {
public FillResult fillMask(Grid mask, DictEntry[] dictIndex,
int logEveryMs, int timeLimitMs) {
int timeLimitMs) {
boolean multiThreaded = Thread.currentThread().getName().contains("pool");
var grid = mask.deepCopyGrid();
var slots = extractSlots(grid);
@@ -773,7 +774,7 @@ public record SwedishGenerator(Rng rng) {
Runnable renderProgress = () -> {
if (!Main.VERBOSE || multiThreaded) return;
var now = System.currentTimeMillis();
if ((now - lastLog.get()) < logEveryMs) return;
if ((now - lastLog.get()) < LOG_EVERY_MS) return;
lastLog.set(now);
var done = assigned.size();