Skip to content

Commit

Permalink
OperationPerformanceInformation: added toString for debug purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Feb 15, 2023
1 parent c35cc11 commit 3dc5f0e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2021 Evolveum and contributors
* Copyright (C) 2010-2023 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
Expand All @@ -19,7 +19,7 @@ public class OperationPerformanceInformation implements ShortDumpable, Cloneable

private int invocationCount;
private int executionCount; // counts each attempt, including retries
private long totalTime;
private long totalTime; // ms
private Long minTime;
private Long maxTime;
private long totalWastedTime;
Expand Down Expand Up @@ -131,4 +131,19 @@ public OperationPerformanceInformation clone() {
throw new SystemException(e);
}
}

/** Shortened string info mentioned mostly for debugger usage. */
@Override
public String toString() {
return "OpPerfInfo{" +
"I=" + invocationCount +
", E=" + executionCount +
", totalMs=" + totalTime +
", minMs=" + minTime +
", maxMs=" + maxTime +
", wastedMs=" + totalWastedTime +
", minWMs=" + minWastedTime +
", maxWMs=" + maxWastedTime +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class OperationRecord {
private long handle;
private int attempts;
private long startTime;
private long totalTime;
private long totalTime; // in ms
private long wastedTime;

public OperationRecord(String kind, Class<?> objectType, long handle) {
Expand Down

0 comments on commit 3dc5f0e

Please sign in to comment.