Record Class TestFileTelemetry
java.lang.Object
java.lang.Record
org.sonar.plugins.python.telemetry.collectors.TestFileTelemetry
- Record Components:
totalMainFiles- Total number of files classified as MAINmisclassifiedTestFiles- Number of MAIN files that import unittest or pytest (likely test files)
Telemetry data for tracking test file misclassification.
-
Constructor Summary
ConstructorsConstructorDescriptionTestFileTelemetry(long totalMainFiles, long misclassifiedTestFiles) Creates an instance of aTestFileTelemetryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(TestFileTelemetry other) static TestFileTelemetryempty()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 themisclassifiedTestFilesrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalMainFilesrecord component.
-
Constructor Details
-
TestFileTelemetry
public TestFileTelemetry(long totalMainFiles, long misclassifiedTestFiles) Creates an instance of aTestFileTelemetryrecord class.- Parameters:
totalMainFiles- the value for thetotalMainFilesrecord componentmisclassifiedTestFiles- the value for themisclassifiedTestFilesrecord 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 '=='. -
totalMainFiles
public long totalMainFiles()Returns the value of thetotalMainFilesrecord component.- Returns:
- the value of the
totalMainFilesrecord component
-
misclassifiedTestFiles
public long misclassifiedTestFiles()Returns the value of themisclassifiedTestFilesrecord component.- Returns:
- the value of the
misclassifiedTestFilesrecord component
-