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 MAINimportBasedMisclassifiedTestFiles- Number of MAIN files that appear to be test files based on import heuristic (import unittest/pytest or follow pytest patterns)totalLines- Total number of lines across all files (MAIN + TEST)totalMainLines- Total number of lines across all MAIN filestestLines- Number of lines across all TEST files (as classified by the scanner engine)importBasedMisclassifiedTestLines- Number of lines across import-based misclassified test files (subset of totalMainLines)pathBasedMisclassifiedTestFiles- Number of MAIN files that appear to be test files based on path heuristic (contains "test" or "tests" in path)pathBasedMisclassifiedTestLines- Number of lines across path-based misclassified test filesfilesInImportBasedOnly- Number of files detected by import-based heuristic but not by path-based heuristicfilesInPathBasedOnly- Number of files detected by path-based heuristic but not by import-based heuristiclinesInImportBasedOnly- Number of lines in files detected by import-based heuristic but not by path-based heuristiclinesInPathBasedOnly- Number of lines in files detected by path-based heuristic but not by import-based heuristic
public record TestFileTelemetry(long totalMainFiles, long importBasedMisclassifiedTestFiles, long totalLines, long totalMainLines, long testLines, long importBasedMisclassifiedTestLines, long pathBasedMisclassifiedTestFiles, long pathBasedMisclassifiedTestLines, long filesInImportBasedOnly, long filesInPathBasedOnly, long linesInImportBasedOnly, long linesInPathBasedOnly)
extends Record
Telemetry data for tracking test file misclassification.
-
Constructor Summary
ConstructorsConstructorDescriptionTestFileTelemetry(long totalMainFiles, long importBasedMisclassifiedTestFiles, long totalLines, long totalMainLines, long testLines, long importBasedMisclassifiedTestLines, long pathBasedMisclassifiedTestFiles, long pathBasedMisclassifiedTestLines, long filesInImportBasedOnly, long filesInPathBasedOnly, long linesInImportBasedOnly, long linesInPathBasedOnly) 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.longReturns the value of thefilesInImportBasedOnlyrecord component.longReturns the value of thefilesInPathBasedOnlyrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of theimportBasedMisclassifiedTestFilesrecord component.longReturns the value of theimportBasedMisclassifiedTestLinesrecord component.longReturns the value of thelinesInImportBasedOnlyrecord component.longReturns the value of thelinesInPathBasedOnlyrecord component.longReturns the value of thepathBasedMisclassifiedTestFilesrecord component.longReturns the value of thepathBasedMisclassifiedTestLinesrecord component.longReturns the value of thetestLinesrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalLinesrecord component.longReturns the value of thetotalMainFilesrecord component.longReturns the value of thetotalMainLinesrecord component.
-
Constructor Details
-
TestFileTelemetry
public TestFileTelemetry(long totalMainFiles, long importBasedMisclassifiedTestFiles, long totalLines, long totalMainLines, long testLines, long importBasedMisclassifiedTestLines, long pathBasedMisclassifiedTestFiles, long pathBasedMisclassifiedTestLines, long filesInImportBasedOnly, long filesInPathBasedOnly, long linesInImportBasedOnly, long linesInPathBasedOnly) Creates an instance of aTestFileTelemetryrecord class.- Parameters:
totalMainFiles- the value for thetotalMainFilesrecord componentimportBasedMisclassifiedTestFiles- the value for theimportBasedMisclassifiedTestFilesrecord componenttotalLines- the value for thetotalLinesrecord componenttotalMainLines- the value for thetotalMainLinesrecord componenttestLines- the value for thetestLinesrecord componentimportBasedMisclassifiedTestLines- the value for theimportBasedMisclassifiedTestLinesrecord componentpathBasedMisclassifiedTestFiles- the value for thepathBasedMisclassifiedTestFilesrecord componentpathBasedMisclassifiedTestLines- the value for thepathBasedMisclassifiedTestLinesrecord componentfilesInImportBasedOnly- the value for thefilesInImportBasedOnlyrecord componentfilesInPathBasedOnly- the value for thefilesInPathBasedOnlyrecord componentlinesInImportBasedOnly- the value for thelinesInImportBasedOnlyrecord componentlinesInPathBasedOnly- the value for thelinesInPathBasedOnlyrecord 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
-
importBasedMisclassifiedTestFiles
public long importBasedMisclassifiedTestFiles()Returns the value of theimportBasedMisclassifiedTestFilesrecord component.- Returns:
- the value of the
importBasedMisclassifiedTestFilesrecord component
-
totalLines
public long totalLines()Returns the value of thetotalLinesrecord component.- Returns:
- the value of the
totalLinesrecord component
-
totalMainLines
public long totalMainLines()Returns the value of thetotalMainLinesrecord component.- Returns:
- the value of the
totalMainLinesrecord component
-
testLines
public long testLines()Returns the value of thetestLinesrecord component.- Returns:
- the value of the
testLinesrecord component
-
importBasedMisclassifiedTestLines
public long importBasedMisclassifiedTestLines()Returns the value of theimportBasedMisclassifiedTestLinesrecord component.- Returns:
- the value of the
importBasedMisclassifiedTestLinesrecord component
-
pathBasedMisclassifiedTestFiles
public long pathBasedMisclassifiedTestFiles()Returns the value of thepathBasedMisclassifiedTestFilesrecord component.- Returns:
- the value of the
pathBasedMisclassifiedTestFilesrecord component
-
pathBasedMisclassifiedTestLines
public long pathBasedMisclassifiedTestLines()Returns the value of thepathBasedMisclassifiedTestLinesrecord component.- Returns:
- the value of the
pathBasedMisclassifiedTestLinesrecord component
-
filesInImportBasedOnly
public long filesInImportBasedOnly()Returns the value of thefilesInImportBasedOnlyrecord component.- Returns:
- the value of the
filesInImportBasedOnlyrecord component
-
filesInPathBasedOnly
public long filesInPathBasedOnly()Returns the value of thefilesInPathBasedOnlyrecord component.- Returns:
- the value of the
filesInPathBasedOnlyrecord component
-
linesInImportBasedOnly
public long linesInImportBasedOnly()Returns the value of thelinesInImportBasedOnlyrecord component.- Returns:
- the value of the
linesInImportBasedOnlyrecord component
-
linesInPathBasedOnly
public long linesInPathBasedOnly()Returns the value of thelinesInPathBasedOnlyrecord component.- Returns:
- the value of the
linesInPathBasedOnlyrecord component
-