git.iko.soy/typeable/pandoc
on master help sign in
Removed stats.sh.
commitfa99793540716514d46ebd6d5018fa8deed4ef62 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 16 Aug 2012, 20:23 (14 years ago) parentc7bd034
1 file changed−33
stats.sh−33
stats.shdeleted−33
@@ -1,33 +0,0 @@
1−#!/bin/sh
2−
3−# Generates statistics on pandoc: benchmarks and lines of code
4−# The stats are put in the stats directory, marked with date and revision hash.
5−
6−STATSDIR=stats
7−mkdir $STATSDIR
8−
9−DATE=`date +%Y_%m_%d`
10−REV=`git rev-parse --short HEAD`
11−
12−EXT=$DATE.$REV
13−BENCH=$STATSDIR/benchmark.$EXT
14−LOC=$STATSDIR/loc.$EXT
15−SUMMARY=$STATSDIR/summary.$EXT
16−
17−runghc Benchmark.hs > $BENCH
18−find src -name '*.hs' | xargs wc -l > $LOC
19−
20−LOCSUM=`tail -1 $LOC | sed -Ee 's/^ *([0-9]+).*/\1/'`
21−
22−echo "Revision $REV" > $SUMMARY
23−echo `date` >> $SUMMARY
24−echo "$LOCSUM lines of code" >> $SUMMARY
25−echo "" >> $SUMMARY
26−
27−sed -nEe '/^(benchmarking|mean:)/p' $BENCH | \
28− sed -Ee '/benchmarking/N;s/\n/: /' | \
29− sed -Ee 's/benchmarking (.*)/\1/' | \
30− sed -Ee 's/mean: ([^ ]*) *([^,]*).*/\1:\2/' | \
31− awk 'BEGIN { FS = ": *" } ; { printf("%s:%7.2f %s\n", $1, $2, $3); }' | \
32− column -t -s ":" >> $SUMMARY
33−