What's cooking (2014/09 #07)
[alt-git.git] / RelStat
blob95a2a5078b90c96be9bd4351711335c5c27e52ab
1 #!/bin/sh
3 handle () {
4 old=$1 new=$2
5 days=$((
6 ($(git log -1 --format=%ct "$new"^0) -
7 $(git log -1 --format=%ct "$old"^0))
8 / ( 3600 * 24 )
9 ))
10 commits=$( git rev-list --no-merges "$old..$new" | wc -l )
11 cpd=$(echo 2k $commits $days / p | dc)
13 if :; then
14 mod=- mpd=-
15 else
16 common=$(Meta/Linus -s $old $new -- '*.[ch]')
17 total=${common#?* }
18 common=${common% ?*}
19 removed=$(( $total - $common ))
21 common=$(Meta/Linus -s $new $old -- '*.[ch]')
22 total=${common#?* }
23 common=${common% ?*}
24 added=$(( $total - $common ))
26 mod=$(( $removed + $added ))
27 mpd=$(echo 2k $mod $days / p | dc)
29 mod2=$(
31 echo 0
32 git diff --numstat -M $old $new -- '*.[ch]' |
33 sed -e 's/^\([0-9]*\) \([0-9]*\) .*/\1 + \2 +/'
34 echo p
35 ) | dc
37 mpd2=$(echo 2k $mod2 $days / p | dc)
39 echo "$new $days $commits $cpd $mod $mpd $mod2 $mpd2"
42 releases='
43 v1.3.0 v1.3.1 v1.3.2 v1.3.3 v1.4.0 v1.4.1 v1.4.2 v1.4.3 v1.4.4 v1.5.0
44 v1.5.1 v1.5.2 v1.5.3 v1.5.4 v1.5.5 v1.5.6 v1.6.0 v1.6.1 v1.6.2 v1.6.3
45 v1.6.4 v1.6.5 v1.6.6 v1.7.0 v1.7.1 v1.7.2 v1.7.3 v1.7.4 v1.7.5 v1.7.6
46 v1.7.7 v1.7.8 v1.7.9 v1.7.10 v1.7.11 v1.7.12 v1.8.0
47 v1.8.1 v1.8.2
50 old=
51 for new in $releases
53 if test -n "$old"
54 then
55 handle "$old" "$new"
57 old=$new
58 done
60 exit
61 ----------------------------------------------------------------
62 v1.3.1 6 14 2.33 33 5.50 41 6.83
63 v1.3.2 8 18 2.25 60 7.50 66 8.25
64 v1.3.3 11 24 2.18 201 18.27 236 21.45
65 v1.4.0 25 621 24.84 9935 397.40 12385 495.40
66 v1.4.1 21 196 9.33 3055 145.47 3419 162.80
67 v1.4.2 42 338 8.04 5032 119.80 5565 132.50
68 v1.4.3 66 647 9.80 9646 146.15 13496 204.48
69 v1.4.4 27 322 11.92 7489 277.37 8041 297.81
71 v1.5.0 90 1448 16.08 12369 137.43 13640 151.55
72 v1.5.1 49 643 13.12 7822 159.63 8213 167.61
73 v1.5.2 46 575 12.50 7604 165.30 8273 179.84
74 v1.5.3 104 1322 12.71 8081 77.70 9538 91.71
75 v1.5.4 152 1595 10.49 21422 140.93 24934 164.03
76 v1.5.5 66 729 11.04 9790 148.33 12172 184.42
77 v1.5.6 71 569 8.01 7091 99.87 8354 117.66
78 v1.6.0 59 731 12.38 16709 283.20 19481 330.18
79 v1.6.1 129 1033 8.00 10316 79.96 14262 110.55
80 v1.6.2 69 499 7.23 4835 70.07 5322 77.13
81 v1.6.3 63 692 10.98 6642 105.42 8687 137.88
82 v1.6.4 83 500 6.02 13571 163.50 14296 172.24
83 v1.6.5 72 412 5.72 5018 69.69 5623 78.09
84 v1.6.6 74 483 6.52 6011 81.22 6730 90.94
85 v1.7.0 51 569 11.15 7698 150.94 8635 169.31
86 v1.7.1 70 477 6.81 5830 83.28 6558 93.68
87 v1.7.2 88 532 6.04 5615 63.80 6380 72.50
88 v1.7.3 59 481 8.15 20753 351.74 21473 363.94
89 v1.7.4 134 746 5.56 8527 63.63 9744 72.71
90 v1.7.5 83 548 6.60 6766 81.51 7543 90.87
91 v1.7.6 63 427 6.77 3962 62.88 4351 69.06
92 v1.7.7 96 563 5.86 8928 93.00 10107 105.28
93 v1.7.8 62 426 6.87 5098 82.22 5463 88.11
94 v1.7.9 56 391 6.98 6338 113.17 6886 122.96
95 v1.7.10 69 440 6.37 5051 73.20 7271 105.37
96 v1.7.11 72 652 9.05 7354 102.13 8863 123.09
97 v1.7.12 63 382 6.06 3060 48.57 3411 54.14
98 v1.8.0 62 497 8.01 5611 90.50 6037 97.37
99 v1.8.1 71 348 4.90 2921 41.14 6047 85.16
100 v1.8.2 71 635 8.94 5881 82.83 6355 89.50
101 ----------------------------------------------------------------
103 <tr><th>release</th><th>days</th><th>commits</th><th>commit/day</th><th>modified</th><th>mod/day</th><th>modified2</th><th>mod2/day</th></tr>
104 <tr><td>v1.5.0</td><td>90</td><td>1448</td><td>16.08</td><td>12369</td><td>137.43</td><td>13640</td><td>151.55</td></tr>
105 <tr><td>v1.5.1</td><td>49</td><td>643</td><td>13.12</td><td>7822</td><td>159.63</td><td>8213</td><td>167.61</td></tr>
106 <tr><td>v1.5.2</td><td>46</td><td>575</td><td>12.50</td><td>7604</td><td>165.30</td><td>8273</td><td>179.84</td></tr>
107 <tr><td>v1.5.3</td><td>104</td><td>1322</td><td>12.71</td><td>8081</td><td>77.70</td><td>9538</td><td>91.71</td></tr>
108 <tr><td>v1.5.4</td><td>152</td><td>1595</td><td>10.49</td><td>21422</td><td>140.93</td><td>24934</td><td>164.03</td></tr>
109 <tr><td>v1.5.5</td><td>66</td><td>729</td><td>11.04</td><td>9790</td><td>148.33</td><td>12172</td><td>184.42</td></tr>
110 <tr><td>v1.5.6</td><td>71</td><td>569</td><td>8.01</td><td>7091</td><td>99.87</td><td>8354</td><td>117.66</td></tr>
111 <tr><td>v1.6.0</td><td>59</td><td>731</td><td>12.38</td><td>16709</td><td>283.20</td><td>19481</td><td>330.18</td></tr>
112 <tr><td>v1.6.1</td><td>129</td><td>1033</td><td>8.00</td><td>10316</td><td>79.96</td><td>14262</td><td>110.55</td></tr>
113 <tr><td>v1.6.2</td><td>69</td><td>499</td><td>7.23</td><td>4835</td><td>70.07</td><td>5322</td><td>77.13</td></tr>
114 <tr><td>v1.6.3</td><td>63</td><td>692</td><td>10.98</td><td>6642</td><td>105.42</td><td>8687</td><td>137.88</td></tr>
115 <tr><td>v1.6.4</td><td>83</td><td>500</td><td>6.02</td><td>13571</td><td>163.50</td><td>14296</td><td>172.24</td></tr>
116 <tr><td>v1.6.5</td><td>72</td><td>412</td><td>5.72</td><td>5018</td><td>69.69</td><td>5623</td><td>78.09</td></tr>
117 <tr><td>v1.6.6</td><td>74</td><td>483</td><td>6.52</td><td>6011</td><td>81.22</td><td>6730</td><td>90.94</td></tr>
118 <tr><td>v1.7.0</td><td>51</td><td>569</td><td>11.15</td><td>7698</td><td>150.94</td><td>8635</td><td>169.31</td></tr>
119 <tr><td>v1.7.1</td><td>70</td><td>477</td><td>6.81</td><td>5830</td><td>83.28</td><td>6558</td><td>93.68</td></tr>
120 <tr><td>v1.7.2</td><td>88</td><td>532</td><td>6.04</td><td>5615</td><td>63.80</td><td>6380</td><td>72.50</td></tr>
121 <tr><td>v1.7.3</td><td>59</td><td>481</td><td>8.15</td><td>20753</td><td>351.74</td><td>21473</td><td>363.94</td></tr>
122 <tr><td>v1.7.4</td><td>134</td><td>746</td><td>5.56</td><td>8527</td><td>63.63</td><td>9744</td><td>72.71</td></tr>
123 <tr><td>v1.7.5</td><td>83</td><td>548</td><td>6.60</td><td>6766</td><td>81.51</td><td>7543</td><td>90.87</td></tr>
124 <tr><td>v1.7.6</td><td>63</td><td>427</td><td>6.77</td><td>3962</td><td>62.88</td><td>4351</td><td>69.06</td></tr>
125 <tr><td>v1.7.7</td><td>96</td><td>563</td><td>5.86</td><td>8928</td><td>93.00</td><td>10107</td><td>105.28</td></tr>
126 <tr><td>v1.7.8</td><td>62</td><td>426</td><td>6.87</td><td>5098</td><td>82.22</td><td>5463</td><td>88.11</td></tr>
127 <tr><td>v1.7.9</td><td>56</td><td>391</td><td>6.98</td><td>6338</td><td>113.17</td><td>6886</td><td>122.96</td></tr>
128 <tr><td>v1.7.10</td><td>69</td><td>440</td><td>6.37</td><td>5051</td><td>73.20</td><td>7271</td><td>105.37</td></tr>
129 <tr><td>v1.7.11</td><td>72</td><td>652</td><td>9.05</td><td>7354</td><td>102.13</td><td>8863</td><td>123.09</td></tr>
130 <tr><td>v1.7.12</td><td>63</td><td>382</td><td>6.06</td><td>3060</td><td>48.57</td><td>3411</td><td>54.14</td></tr>
131 <tr><td>v1.8.0</td><td>62</td><td>497</td><td>8.01</td><td>5611</td><td>90.50</td><td>6037</td><td>97.37</td></tr>
132 <tr><td>v1.8.1</td><td>71</td><td>348</td><td>4.90</td><td>2921</td><td>41.14</td><td>6047</td><td>85.16</td></tr>
133 <tr><td>v1.8.2</td><td>71</td><td>635</td><td>8.94</td><td>5881</td><td>82.83</td><td>6355</td><td>89.50</td></tr>