Gather data
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user