Added progress indicator to node validation
All checks were successful
/ Build the server (push) Successful in 2m15s
All checks were successful
/ Build the server (push) Successful in 2m15s
This commit is contained in:
parent
3abef19b88
commit
8ca8cfd16f
@ -10,11 +10,13 @@ import java.util.HashSet;
|
||||
@Slf4j
|
||||
public class DataValidator {
|
||||
private static long errors = 0;
|
||||
private static long totalNodes = 0, completedNodes = 0;
|
||||
|
||||
public static void validateData() {
|
||||
log.info("Validating data");
|
||||
try {
|
||||
long lastUserId = -1;
|
||||
for (User user : Data.USERS.values()) totalNodes += user.nodes.size();
|
||||
for (User user : Data.USERS.values()) {
|
||||
validateUser(user);
|
||||
lastUserId = Math.max(lastUserId, user.id);
|
||||
@ -90,5 +92,7 @@ public class DataValidator {
|
||||
errors++;
|
||||
}
|
||||
}
|
||||
if ((++completedNodes) % 50 == 0)
|
||||
log.info("Validated node {} of {}", completedNodes, totalNodes);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user