diff options
author | Graham Wilson <graham@mknod.org> | 2004-08-30 01:34:48 +0000 |
---|---|---|
committer | Graham Wilson <graham@mknod.org> | 2004-08-30 01:34:48 +0000 |
commit | c3a80da98846c21a5d3f32a91669d78774a0aa6a (patch) | |
tree | 72bee6836c468c8527560821cd65618f2c7b115d /dist-tools/timeplot | |
parent | fd2543489b53fe34a18b7204d6803bf527c0d198 (diff) | |
download | fetchmail-c3a80da98846c21a5d3f32a91669d78774a0aa6a.tar.gz fetchmail-c3a80da98846c21a5d3f32a91669d78774a0aa6a.tar.bz2 fetchmail-c3a80da98846c21a5d3f32a91669d78774a0aa6a.zip |
Move a handful of scripts (used for releases, testing, etc.) to dist-tools, so that they are not released in the tarball.
svn path=/trunk/; revision=3934
Diffstat (limited to 'dist-tools/timeplot')
-rwxr-xr-x | dist-tools/timeplot | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/dist-tools/timeplot b/dist-tools/timeplot new file mode 100755 index 00000000..c8240d05 --- /dev/null +++ b/dist-tools/timeplot @@ -0,0 +1,40 @@ +#!/bin/sh +# +# timeplot -- plot data on fetchmail release intervals +# +# + +# Get data from the NEWS file +timeseries | awk >/tmp/timeplot$$ ' +START {maxdiff = 0;} +/^[#%]/ {next;} + {days[count++] = $6;} +END { + for (i = 0; i < count-1; i++) + { + diffs[i] = days[i] - days[i + 1]; + if (maxdiff < diffs[i]) + maxdiff = diffs[i]; + } + for (i = 0; i <= maxdiff; i++) + freq[i] = 0; + for (i = 0; i < count - 1; i++) + { + freq[diffs[i]]++; + } + for (i = 0; i <= maxdiff; i++) + printf("%d %d\n", i, freq[i]); + } +' + +gnuplot >time.png - <<EOF +set xlabel "Release interval (days)" +set ylabel "Interval frequency" +plot '/tmp/timeplot$$' using 1:2 \ + title "Release interval frequency" +pause 9999 +EOF + +rm -f /tmp/time* + +# timeplot ends here |