Package cs1302.tracer.execution
Record Class TraceLimits
java.lang.Object
java.lang.Record
cs1302.tracer.execution.TraceLimits
- Record Components:
timeoutMillis- Elapsed tracing deadline, excluding compilation.snapshots- Maximum completed snapshots captured, including replaced snapshots.outputBytes- Maximum retained bytes per guest output stream.heapObjects- Maximum distinct reachable objects per snapshot.elements- Maximum inspected fields/array elements/string characters per snapshot.traceBytes- Maximum accounted retained snapshot bytes.sourceBytes- Maximum UTF-8 source bytes.sourceFiles- Maximum streamed source files.threads- Maximum live application threads.frames- Maximum total frames per snapshot.snapshotBytes- Maximum accounted bytes for one snapshot.
public record TraceLimits(long timeoutMillis, long snapshots, long outputBytes, long heapObjects, long elements, long traceBytes, long sourceBytes, long sourceFiles, long threads, long frames, long snapshotBytes)
extends Record
Trace budgets. Zero means unlimited; byte counts use bytes, time uses milliseconds.
-
Constructor Summary
ConstructorsConstructorDescriptionTraceLimits(long timeoutMillis, long snapshots, long outputBytes, long heapObjects, long elements, long traceBytes, long sourceBytes, long sourceFiles) Constructs the original budgets with unlimited thread-specific ceilings.TraceLimits(long timeoutMillis, long snapshots, long outputBytes, long heapObjects, long elements, long traceBytes, long sourceBytes, long sourceFiles, long threads, long frames, long snapshotBytes) Validates budgets before any work starts. -
Method Summary
Modifier and TypeMethodDescriptionlongelements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.longframes()Returns the value of theframesrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theheapObjectsrecord component.static TraceLimitsReturns the ordinary instructor CLI policy.longReturns the value of theoutputBytesrecord component.longReturns the value of thesnapshotBytesrecord component.longReturns the value of thesnapshotsrecord component.longReturns the value of thesourceBytesrecord component.longReturns the value of thesourceFilesrecord component.longthreads()Returns the value of thethreadsrecord component.longReturns the value of thetimeoutMillisrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetraceBytesrecord component.static TraceLimitsReturns the trusted unlimited policy.
-
Constructor Details
-
TraceLimits
public TraceLimits(long timeoutMillis, long snapshots, long outputBytes, long heapObjects, long elements, long traceBytes, long sourceBytes, long sourceFiles) Constructs the original budgets with unlimited thread-specific ceilings.- Parameters:
timeoutMillis- Deadline.snapshots- Snapshot count.outputBytes- Output bytes.heapObjects- Heap objects.elements- Inspected elements.traceBytes- Retained bytes.sourceBytes- Source bytes.sourceFiles- Source files.
-
TraceLimits
public TraceLimits(long timeoutMillis, long snapshots, long outputBytes, long heapObjects, long elements, long traceBytes, long sourceBytes, long sourceFiles, long threads, long frames, long snapshotBytes) Validates budgets before any work starts.
-
-
Method Details
-
instructorDefaults
Returns the ordinary instructor CLI policy.- Returns:
- Finite budgets for interactive examples.
-
unlimited
Returns the trusted unlimited policy.- Returns:
- Unlimited budgets.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
timeoutMillis
public long timeoutMillis()Returns the value of thetimeoutMillisrecord component.- Returns:
- the value of the
timeoutMillisrecord component
-
snapshots
public long snapshots()Returns the value of thesnapshotsrecord component.- Returns:
- the value of the
snapshotsrecord component
-
outputBytes
public long outputBytes()Returns the value of theoutputBytesrecord component.- Returns:
- the value of the
outputBytesrecord component
-
heapObjects
public long heapObjects()Returns the value of theheapObjectsrecord component.- Returns:
- the value of the
heapObjectsrecord component
-
elements
public long elements()Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-
traceBytes
public long traceBytes()Returns the value of thetraceBytesrecord component.- Returns:
- the value of the
traceBytesrecord component
-
sourceBytes
public long sourceBytes()Returns the value of thesourceBytesrecord component.- Returns:
- the value of the
sourceBytesrecord component
-
sourceFiles
public long sourceFiles()Returns the value of thesourceFilesrecord component.- Returns:
- the value of the
sourceFilesrecord component
-
threads
public long threads()Returns the value of thethreadsrecord component.- Returns:
- the value of the
threadsrecord component
-
frames
public long frames()Returns the value of theframesrecord component.- Returns:
- the value of the
framesrecord component
-
snapshotBytes
public long snapshotBytes()Returns the value of thesnapshotBytesrecord component.- Returns:
- the value of the
snapshotBytesrecord component
-