未验证 提交 708bbdc9 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #4081 from jglick/NodeProvisioner-logging

Improved logging for NodeProvisioner
......@@ -174,9 +174,12 @@ public class NodeProvisioner {
lastSuggestedReview = System.currentTimeMillis();
Computer.threadPoolForRemoting.submit(new Runnable() {
public void run() {
LOGGER.fine(() -> "running suggested review for " + label);
update();
}
});
} else {
LOGGER.fine(() -> "ignoring suggested review for " + label);
}
}
......@@ -188,6 +191,7 @@ public class NodeProvisioner {
* instance of this provisioner is running at a time) and then a lock on {@link Queue#lock}
*/
private void update() {
long start = LOGGER.isLoggable(Level.FINER) ? System.nanoTime() : 0;
provisioningLock.lock();
try {
lastSuggestedReview = System.currentTimeMillis();
......@@ -327,6 +331,9 @@ public class NodeProvisioner {
} finally {
provisioningLock.unlock();
}
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.finer(() -> "ran update on " + label + " in " + (System.nanoTime() - start) / 1_000_000 + "ms");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册