Graphing perl commits

nicholas on 2009-04-25T21:10:01

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;
    @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)