Record Class CompilationProfile
java.lang.Object
java.lang.Record
io.micronaut.python.compiler.CompilationProfile
- Record Components:
attributes- The attributes of the compilation: the JVM, the target directory, the number of compilations of this JVM, ...phases- The phases in the order they started, with their total inclusive time and invocationscounters- The counters, by nameartifacts- The inventory of the output directory by kind, when the compilation wrote to disk
@Internal
public record CompilationProfile(Map<String,String> attributes, List<CompilationProfile.Phase> phases, Map<String,Long> counters, List<CompilationProfile.Artifact> artifacts)
extends Record
The profile of one Python compilation: how long each phase of the compiler took, what it counted
on the way, and the inventory of what it wrote. Collected only when profiling is enabled (see
PyronautCompiler.Builder.profileReportFile(java.io.File)), and rendered as one block of
key=value lines, so that a report file holding several compilations can be compared
between revisions without a parser.- Since:
- 5.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe files of one kind in the output directory.static final recordA phase of the compilation. -
Constructor Summary
ConstructorsConstructorDescriptionCompilationProfile(Map<String, String> attributes, List<CompilationProfile.Phase> phases, Map<String, Long> counters, List<CompilationProfile.Artifact> artifacts) Creates an instance of aCompilationProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionThe inventory of the given kind.Returns the value of theartifactsrecord component.Returns the value of theattributesrecord component.counters()Returns the value of thecountersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.The phase of the given name.phases()Returns the value of thephasesrecord component.render()Renders the profile as a block ofkey=valuelines, one compilation per block: the attributes, thenphase.<name>.ms(andphase.<name>.countwhen a phase ran more than once) per phase in start order, thencounter.<name>andartifact.<kind>.count/artifact.<kind>.bytes.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompilationProfile
public CompilationProfile(Map<String, String> attributes, List<CompilationProfile.Phase> phases, Map<String, Long> counters, List<CompilationProfile.Artifact> artifacts) Creates an instance of aCompilationProfilerecord class.- Parameters:
attributes- the value for theattributesrecord componentphases- the value for thephasesrecord componentcounters- the value for thecountersrecord componentartifacts- the value for theartifactsrecord component
-
-
Method Details
-
phase
The phase of the given name.- Parameters:
name- The name- Returns:
- The phase, or null when it did not run
-
artifact
The inventory of the given kind.- Parameters:
kind- The kind- Returns:
- The artifact, or null when nothing of the kind was written
-
render
Renders the profile as a block ofkey=valuelines, one compilation per block: the attributes, thenphase.<name>.ms(andphase.<name>.countwhen a phase ran more than once) per phase in start order, thencounter.<name>andartifact.<kind>.count/artifact.<kind>.bytes.- Returns:
- The rendered profile
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
phases
-
counters
-
artifacts
-