Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
  • Loading branch information
lpetrovic05 committed May 3, 2023
1 parent 8f9dd4e commit 44293aa
Showing 1 changed file with 9 additions and 7 deletions.
Expand Up @@ -27,11 +27,10 @@
import com.swirlds.common.utility.throttle.RateLimiter;
import com.swirlds.logging.LogMarker;
import edu.umd.cs.findbugs.annotations.NonNull;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.time.Duration;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
* A metric that measures the fraction of time that a thread is busy. This metric could be used to track the overall busy
Expand Down Expand Up @@ -173,10 +172,13 @@ private long statusUpdate(final long previousPair, final long statusChange) {
|| (statusChange == WORK_END && isIdle(currentStatus))) {
// this means that the metric has not been updated correctly, we will not change the value
if (logLimiter.request()) {
log.error(LogMarker.EXCEPTION.getMarker(),
"BusyTime metric has been updated incorrectly. " +
"Current status: {}, status change: {}, stack trace: \n{}",
currentStatus, statusChange, StackTrace.getStackTrace().toString());
log.error(
LogMarker.EXCEPTION.getMarker(),
"BusyTime metric has been updated incorrectly. "
+ "Current status: {}, status change: {}, stack trace: \n{}",
currentStatus,
statusChange,
StackTrace.getStackTrace().toString());
}
return previousPair;
}
Expand Down

0 comments on commit 44293aa

Please sign in to comment.