public class ProfileStackFrame extends Object implements Comparable<ProfileStackFrame>
Constructor and Description |
---|
ProfileStackFrame(String className,
String methodName)
Creates a new profile stack frame with the provided information.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ProfileStackFrame f)
Indicates the order of this profile stack frame relative to the provided object in a sorted list.
|
boolean |
equals(Object o)
Indicates whether the provided object is equal to this stack frame.
|
String |
getClassName()
Retrieves the class name for this stack frame.
|
String |
getHTMLSafeMethodName()
Retrieves the method name for this stack frame in a manner that will be safe for use in an HTML context.
|
Map<Integer,Long> |
getLineNumbers()
Retrieves the mapping between the line numbers associated with this method and the number of occurrences for each
of those line numbers.
|
String |
getMethodName()
Retrieves the method name for this stack frame.
|
ProfileStackFrame[] |
getSubordinateFrames()
Retrieves an array containing the subordinate frames that were seen below this frame in stack traces.
|
long |
getTotalCount()
Retrieves the total number of times that a frame with this class and method name was seen by the profiler thread.
|
int |
hashCode()
Retrieves the hash code for this stack frame.
|
boolean |
hasSubFrames()
Indicates whether this stack frame has one or more subordinate frames.
|
void |
recurseSubFrames(ProfileStack stack,
int depth,
long count,
Map<String,Map<ProfileStack,Long>> stacksByMethod)
Recursively processes the frames of the provided stack, adding them as nested subordinate frames of this stack
frame.
|
String |
toString()
Retrieves a string representation of this stack frame.
|
void |
updateLineNumberCount(int lineNumber,
long numOccurrences)
Updates the count for the number of occurrences of a given stack frame for the specified line number.
|
public String getClassName()
public String getMethodName()
public String getHTMLSafeMethodName()
public Map<Integer,Long> getLineNumbers()
public void updateLineNumberCount(int lineNumber, long numOccurrences)
lineNumber
- The line number for which to update the count.numOccurrences
- The number of times the specified line was encountered for this stack frame.public long getTotalCount()
public ProfileStackFrame[] getSubordinateFrames()
public boolean hasSubFrames()
true
if this stack frame has one or more subordinate frames, or false
if not.public void recurseSubFrames(ProfileStack stack, int depth, long count, Map<String,Map<ProfileStack,Long>> stacksByMethod)
stack
- The stack trace to use to obtain the frames.depth
- The slot of the next frame to process in the provided array.count
- The number of occurrences for the provided stack.stacksByMethod
- The set of stack traces mapped from method name to their corresponding stack traces.public int hashCode()
public boolean equals(Object o)
public int compareTo(ProfileStackFrame f) throws ClassCastException
compareTo
in interface Comparable<ProfileStackFrame>
f
- The object for which to make the comparison.ClassCastException
- If the provided object is not a profile stack frame.Copyright 2010-2022 ForgeRock AS.