Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of nicholas (3034)

Saturday April 25, 2009
04:10 PM

Graphing perl commits

[ #38870 ]

Based on some code Gisle sent to the list, I've made a graph of commit activity to blead.

I've tweaked Gisle's code to aggregate per week rather than per month, and I've smoothed the data with its two neighbours on either side in the ratios 1:4:6:4:1 (except when there is no data) using

# Smooth 1 4 6 4 1
sub smooth {
    my @in = (undef, undef, @_);
    my @out;
    for my $i (2 .. $#in + 2) {
        next unless defined $in[$i];
        $out[$i] = $in[$i] * 6 / 16;
        $out[$i] += 4 / 16 * ($in[$i-1] // $in[$i]);
        $out[$i] += 4 / 16 * ($in[$i+1] // $in[$i]);
        $out[$i] += 1 / 16 * ($in[$i-2] // $in[$i]);
        $out[$i] += 1 / 16 * ($in[$i+2] // $in[$i]);
    shift @out;
    shift @out;

The rather strange divisor of 35 for the commits means that "1" is 5 commits a day. It seemed better than 33.

So, look at that graph and tell me when we switched from perforce to git.

(An older version of the graph, and the reasons for resorting to log scales are explained in this message, that curiously the archive on xray doesn't have. The new graph has fewer lines and only goes back to 1999, because otherwise I bust the URI lenght limit for Google charts. There's also the monthly graph, smoothed 1:4:6:4:1)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.