Class FileStatistics
java.lang.Object
io.jenkins.plugins.forensics.miner.FileStatistics
- All Implemented Interfaces:
Serializable
Aggregates commit statistics for a given file. The following statistics are summed up:
- total number of commits
- total number of different authors
- creation time
- last modification time
- added lines
- deleted lines
- Author:
- Ullrich Hafner
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CreatesFileBlame
instances that optimize the memory footprint for file names by using aTreeStringBuilder
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns the absolute churn for this file, i.e.Returns all commits this file was part of.int
Returns the creation time of this file.int
Returns the time of the last modification of this file (i.e.int
Returns the total lines of code for this file.int
Returns the number of authors for this file.int
Returns the number of times this file was committed.int
hashCode()
void
inspectCommit
(CommitDiffItem additionalCommit) Inspects and stores the specified commit for this file.void
inspectCommits
(Collection<CommitDiffItem> additionalCommits) Inspects and stores the specified commits for this file.toString()
-
Method Details
-
getFileName
-
getCommits
Returns all commits this file was part of.- Returns:
- all commits for this file
-
getNumberOfAuthors
public int getNumberOfAuthors()Returns the number of authors for this file.- Returns:
- the number authors for this file.
-
getNumberOfCommits
public int getNumberOfCommits()Returns the number of times this file was committed.- Returns:
- the number of commits for this file
-
getCreationTime
public int getCreationTime()Returns the creation time of this file.- Returns:
- the time of the creation (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT).
-
getLastModificationTime
public int getLastModificationTime()Returns the time of the last modification of this file (i.e. last commit to the file).- Returns:
- the time of the last modification (given as number of seconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT).
-
getLinesOfCode
public int getLinesOfCode()Returns the total lines of code for this file.- Returns:
- the total lines of code.
-
getAbsoluteChurn
public int getAbsoluteChurn()Returns the absolute churn for this file, i.e. the sum of all added and deleted lines.- Returns:
- absolute churn
-
inspectCommit
Inspects and stores the specified commit for this file. Updates all properties after the commit has been added, including an optional file name rename.- Parameters:
additionalCommit
- the additional commit to inspect
-
inspectCommits
Inspects and stores the specified commits for this file. Updates all properties after the commit has been added, including an optional file name rename.- Parameters:
additionalCommits
- the additional commits to inspect
-
equals
-
hashCode
public int hashCode() -
toString
-