Record Class TypeInferenceTelemetry
java.lang.Object
java.lang.Record
org.sonar.plugins.python.telemetry.collectors.TypeInferenceTelemetry
- Record Components:
totalNames- Total number of Name nodes in all analyzed treesunknownTypeNames- Number of Names with the UNKNOWN typeunresolvedImportTypeNames- Number of Names with an UnresolvedImportTypetotalImports- Total number of imported items (from both import and from...import statements)importsWithUnknownType- Number of imports that resolve to UNKNOWN or UnresolvedImportTypeuniqueSymbols- Number of unique symbols (using symbolsV2)unknownSymbols- Number of unique symbols which are unknown
public record TypeInferenceTelemetry(long totalNames, long unknownTypeNames, long unresolvedImportTypeNames, long totalImports, long importsWithUnknownType, long uniqueSymbols, long unknownSymbols)
extends Record
Telemetry data for type inference quality metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionTypeInferenceTelemetry(long totalNames, long unknownTypeNames, long unresolvedImportTypeNames, long totalImports, long importsWithUnknownType, long uniqueSymbols, long unknownSymbols) Creates an instance of aTypeInferenceTelemetryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(TypeInferenceTelemetry other) static TypeInferenceTelemetryempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theimportsWithUnknownTyperecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalImportsrecord component.longReturns the value of thetotalNamesrecord component.longReturns the value of theuniqueSymbolsrecord component.longReturns the value of theunknownSymbolsrecord component.longReturns the value of theunknownTypeNamesrecord component.longReturns the value of theunresolvedImportTypeNamesrecord component.
-
Constructor Details
-
TypeInferenceTelemetry
public TypeInferenceTelemetry(long totalNames, long unknownTypeNames, long unresolvedImportTypeNames, long totalImports, long importsWithUnknownType, long uniqueSymbols, long unknownSymbols) Creates an instance of aTypeInferenceTelemetryrecord class.- Parameters:
totalNames- the value for thetotalNamesrecord componentunknownTypeNames- the value for theunknownTypeNamesrecord componentunresolvedImportTypeNames- the value for theunresolvedImportTypeNamesrecord componenttotalImports- the value for thetotalImportsrecord componentimportsWithUnknownType- the value for theimportsWithUnknownTyperecord componentuniqueSymbols- the value for theuniqueSymbolsrecord componentunknownSymbols- the value for theunknownSymbolsrecord component
-
-
Method Details
-
empty
-
add
-
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 '=='. -
totalNames
public long totalNames()Returns the value of thetotalNamesrecord component.- Returns:
- the value of the
totalNamesrecord component
-
unknownTypeNames
public long unknownTypeNames()Returns the value of theunknownTypeNamesrecord component.- Returns:
- the value of the
unknownTypeNamesrecord component
-
unresolvedImportTypeNames
public long unresolvedImportTypeNames()Returns the value of theunresolvedImportTypeNamesrecord component.- Returns:
- the value of the
unresolvedImportTypeNamesrecord component
-
totalImports
public long totalImports()Returns the value of thetotalImportsrecord component.- Returns:
- the value of the
totalImportsrecord component
-
importsWithUnknownType
public long importsWithUnknownType()Returns the value of theimportsWithUnknownTyperecord component.- Returns:
- the value of the
importsWithUnknownTyperecord component
-
uniqueSymbols
public long uniqueSymbols()Returns the value of theuniqueSymbolsrecord component.- Returns:
- the value of the
uniqueSymbolsrecord component
-
unknownSymbols
public long unknownSymbols()Returns the value of theunknownSymbolsrecord component.- Returns:
- the value of the
unknownSymbolsrecord component
-