Skip to content

Commit

Permalink
Provides the starting calculated value of the monitoring indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
doleyzi committed May 16, 2024
1 parent 6eadeb0 commit 83ab364
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public class AuditManagerUtils {

public static final int AUDIT_SUFFIX_LENGTH = 16;
public static final String AUDIT_MAX_PREFIX = "1111";
public static final int AUDIT_MAX_PREFIX_LENGTH = 14;

private static String buildSuccessAndFailureFlag(boolean success) {
return success ? "0" : "1";
Expand Down Expand Up @@ -78,9 +78,10 @@ public static int buildAuditId(AuditIdEnum baseAuditId,

/**
* Get max Audit ID.
*
* @return
*/
public static int getMaxAuditId() {
return (int) Math.pow(2, AUDIT_SUFFIX_LENGTH + AUDIT_MAX_PREFIX.length()) - 1;
public static int getStartAuditIdForMetric() {
return 1 << (AUDIT_SUFFIX_LENGTH + AUDIT_MAX_PREFIX_LENGTH);
}
}

0 comments on commit 83ab364

Please sign in to comment.