The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SVK::Log::Filter::Stats - display cumulative statistics for revisions

SYNOPSIS

    > svk log --output stats //mirror/svk/trunk
    Newest commit : 2006-05-13
    Oldest commit : 2004-07-31
    Commits: 1310
    Days: 651
    Commits per day : 2.0
    Committer count: 13
    Most active committers:
      - clkao    (911)
      - autrijus (244)
      - gugod    (42)
      - matthewd (26)
      - mb       (22)

    > svk log --output stats --verbose --limit 100 //mirror/svk/trunk
    Newest commit : 2006-05-13
    Oldest commit : 2005-11-04
    Commits: 100
    Days: 190
    Days per commit : 1.9
    Committer count: 8
    Most active committers:
      - clkao    (69)
      - stig     (8)
      - mndrix   (7)
      - mb       (6)
      - autrijus (3)
      - nnunley  (3)
      - jesse    (3)
      - gugod    (1)
    Count of modified paths: 138
    Most modified paths:
      - /mirror/svk/trunk                    (20)
      - /mirror/svk/trunk/lib/SVK/XD.pm      (18)
      - /mirror/svk/trunk/lib/SVK/Merge.pm   (16)
      - /mirror/svk/trunk/lib/SVK/Path.pm    (13)
      - /mirror/svk/trunk/lib/SVK/Command.pm (13)
    Concentration:
      Concentration ratio : 0.90
      Herfindahl index : 4938
      Normalized Herfindahl index : 0.49
      Equivalent committers : 2.0

DESCRIPTION

The Stats filter is an output filter which displays statistics about the revisions it sees. The specific statistics are described in the "STATISTICS" section. Two arguments to the log command modify the statistics output format.

quiet

Providing this command-line option to the log command supresses the "Most active committers" and "Committer count" statistics.

verbose

Providing this command-line option to the log command causes the following changes:

STATISTICS

Newest commit

The date of the most recent commit that the filter saw. The date is in the UTC timezone.

Oldest commit

The date of the oldest commit that the filter saw. The date is in the UTC timezone.

Commits

The number of commits that the filter saw.

Days

The number of days between "Newest commit" and "Oldest commit". A day is defined as 86,400 seconds.

Commits per day

The number of commits per day (on average). This is the value of "Commits" divided by the value of "Days". If the value would be less than 1, "Days per commit" is displayed instead.

Days per commit

The number of days between each commit (on average). This is the value of "Days" divided by the value of "Commits". If the value would be less than 1, "Commits per day" is displayed instead.

Committer count

The number of different revision authors seen by the filter. This statistic is suppressed with the --quiet option.

Most active committers

Provides the name and commit count for the top 5 committers seen by the filter. If the --verbose option is given to the log command, all authors are shown. The authors are listed in order of decreasing commit count. This statistic is suppressed with the --quiet option.

Count of modified paths

Shows the number of files and directories that were modified by revisions that the filter saw. This statistic is only shown if the --verbose option was given.

Most modified paths

Shows the top 5 most-modified files and directories within the revisions seen by the filter. The path and the number of commits modifying the path are included in the output.

Concentration ratio

Concentration metrics are used within economics to indicate the relative size of firms within a particular industry. The metrics are generally based on the number of firms and the market share of each firm. Small numbers indicate that there are many firms, each holding a small market share. Large numbers indicate that there are few firms holding a majority of the market.

Applying concentration metrics to version control is perhaps dubious, but can provide a sense of the culture behind the project under revision control. This filter views each committer as a "firm" and each commit as a part of the market. A project in which a single committer made all the revisions would have a large concentration metric. A project with many committers each making numerous commits would have a small concentration metric.

The concentration ratio is a particular concentration metric. This filter uses the 4-firm concentration ratio which is the percentage of commits performed by the top four committers. The value ranges from 0 (low concentration) to 1 (high concentration). See http://en.wikipedia.org/wiki/Concentration_ratio for more information.

Herfindahl index

The Herfindahl index (aka Herfindahl-Hirschman index) is a concentration metric which gives more weight to the size of large firms. The details of the calculation are available from http://www.usdoj.gov/atr/public/testimony/hhi.htm. The value of the Herfindahl index ranges from 0 to 10,000. In economics, a value of 1800 or higher is considered to be "concentrated."

Normalized Herfindahl index

The Herfindahl index divided by 10,000. This makes the number vary between 0 and 1.

Equivalent committers

The inverse of the "Normalized Herfindahl index". This is the number of committers, equally distributed, that would be needed to approximate the current "project culture". For instance if a project has an "Equivalent committers" value of 10, the distribution of commits among committers is the same as if there were 10 committers with the commits evenly distributed among them.

STASH/PROPERTY MODIFICATIONS

Stats leaves all properties intact and does not modify the stash.

AUTHORS

Michael Hendricks <michael@ndrix.org>

LICENSE AND COPYRIGHT

The MIT License

Copyright (c) 2006 Michael Hendricks (<michael@ndrix.org>).

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.