Add trace output for the time the online check took
This commit is contained in:
parent
f1eaa75a57
commit
0edb17ae9f
|
@ -431,7 +431,8 @@ public class LocalRecorder implements Recorder {
|
||||||
running = true;
|
running = true;
|
||||||
while (running) {
|
while (running) {
|
||||||
Instant begin = Instant.now();
|
Instant begin = Instant.now();
|
||||||
for (Model model : getModelsRecording()) {
|
List<Model> models = getModelsRecording();
|
||||||
|
for (Model model : models) {
|
||||||
try {
|
try {
|
||||||
boolean isOnline = model.isOnline(IGNORE_CACHE);
|
boolean isOnline = model.isOnline(IGNORE_CACHE);
|
||||||
LOG.trace("Checking online state for {}: {}", model, (isOnline ? "online" : "offline"));
|
LOG.trace("Checking online state for {}: {}", model, (isOnline ? "online" : "offline"));
|
||||||
|
@ -450,6 +451,7 @@ public class LocalRecorder implements Recorder {
|
||||||
}
|
}
|
||||||
Instant end = Instant.now();
|
Instant end = Instant.now();
|
||||||
Duration timeCheckTook = Duration.between(begin, end);
|
Duration timeCheckTook = Duration.between(begin, end);
|
||||||
|
LOG.trace("Online check for {} models took {} seconds", models.size(), timeCheckTook.getSeconds());
|
||||||
|
|
||||||
long sleepTime = Config.getInstance().getSettings().onlineCheckIntervalInSecs;
|
long sleepTime = Config.getInstance().getSettings().onlineCheckIntervalInSecs;
|
||||||
if(timeCheckTook.getSeconds() < sleepTime) {
|
if(timeCheckTook.getSeconds() < sleepTime) {
|
||||||
|
|
Loading…
Reference in New Issue