-
Notifications
You must be signed in to change notification settings - Fork 1
/
genstats.sh
executable file
·161 lines (121 loc) · 2.9 KB
/
genstats.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#! /bin/bash
# umbrella script to automate the generation of statistics for the kvm and qemu
# projects. Totally hard-coded. Edit the directories, repository locations, and
# file names for a different project.
#####
# prepare haystack and needle for gitmatch
# break git domain csv into a separate file from git contributions csv
# strip commas, strip numbers, sort | uniq > git domain needles
# strip commas from git domain csv to generate haystack
# $ cat 2008-kvm-devel-git.csv | awk '{gsub('/\,/', ""); print $0}' > 2008-kvm-devel-git.csv
##### emcraft.com 3 41 19
KVM_REPO="/Users/mdday/src/kvm"
QEMU_REPO="/Users/mdday/src/qemu"
STATS_DIR="/Users/mdday/src/kvm-community-analysis"
MAIL_DIR="/Users/mdday/mail/"
echo "preparing the directory structure"
mkdir $STATS_DIR >&/dev/null
for year in $@ ;
do
mkdir $STATS_DIR/$year &>/dev/null
done
echo "statistics will be stored in $STATS_DIR"
# start with KVM
pushd $KVM_REPO
pwd
echo "updating the KVM repository"
git pull
git reset --hard origin/master
echo "Generating statistics for KVM for the years $@"
GITSTATDIRSKVM=$(mktemp /tmp/gitstatdirs.XXXXXXXXXX)
cat > $GITSTATDIRSKVM <<EOF
virt
arch/x86/kvm
arch/s390/kvm
arch/powerpc/kvm
drivers/virt
drivers/virtio
drivers/vhost
drivers/s390/kvm
arch/x86/kernel/kvmclock.c
arch/x86/kernel/kvm.c
tools/perf/builtin-kvm.c
include/trace/events/kvm.h
include/linux/kvm_para.h
include/asm-generic/kvm_para.h
include/linux/kvm_types.h
include/linux/kvm.h
arch/x86/include/asm/kvm_emulate.h
arch/x86/include/asm/kvm_host.h
arch/x86/include/asm/kvm_para.h
arch/x86/include/asm/kvm.h
EOF
for year in $@ ;
do
gitstat.sh $KVM_REPO $STATS_DIR/$year/$year-kvm-devel-git.csv \
$STATS_DIR/$year/$year-kvm-devel-dom-git.csv \
--since 01/01/$year --until 12/31/$year -D $GITSTATDIRSKVM
done
popd
echo "Preparing to generate mail list statistics for KVM $@"
for year in $@ ;
do
pushd $STATS_DIR/$year
mbox-filter.sh $MAIL_DIR/kvm-devel-$year
popd
done
echo "KVM statistics are in $STATS_DIR"
echo "Now working on Qemu.."
pushd $QEMU_REPO
pwd
echo "updating the Qemu repository"
git pull
git reset --hard origin/master
echo "Generating statistics for Qemu for the years $@"
GITSTATDIRSQEMU=$(mktemp /tmp/gitstatdirs.XXXXXXXXXX)
cat > $GITSTATDIRSQEMU <<EOF
QMP
audio
block
bsd-user
default-configs
docs
fpu
fsdev
gdb-xml
hw
include
libcacard
linux-headers
linux-user
net
pc-bios
qapi
qga
qom
roms
scripts
sysconfigs
target-i386
target-ppc
target-s390x
tests
trace
ui
EOF
for year in $@ ;
do
gitstat.sh $QEMU_REPO $STATS_DIR/$year/$year-qemu-devel-git.csv \
$STATS_DIR/$year/$year-qemu-devel-dom-git.csv \
--since 01/01/$year --until 12/31/$year -D $GITSTATDIRSQEMU
done
popd
rm $GITSTATDIRSQEMU >&/dev/null
echo "Preparing to generate mail list statistics for Qemu $@"
for year in $@ ;
do
pushd $STATS_DIR/$year
mbox-filter.sh $MAIL_DIR/qemu-$year
popd
done
echo "qemu statistics are in $STATS_DIR"