]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_apachelogs2subscriptionstats
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / nd_apachelogs2subscriptionstats
index c856337b0cfc2574bf5035357014c3703a5d8d20..a2a3f469ce897a689835b099f62b9cdd16b99697 100755 (executable)
@@ -7,7 +7,6 @@ import sys
 import time
 from datetime import datetime
 import re
-import sets
 import json
 import operator
 
@@ -16,7 +15,8 @@ releases = {
     'etch': 'Debian GNU/Linux 4.0 (etch)',
     'lenny': 'Debian GNU/Linux 5.0 (lenny)',
     'squeeze': 'Debian GNU/Linux 6.0 (squeeze)',
-    'wheezy': 'Debian testing (wheezy)',
+    'wheezy': 'Debian GNU/Linux 7.0 (wheezy)',
+    'jessie': 'Debian testing (jessie)',
     'sid': 'Debian unstable (sid)',
     'hardy': 'Ubuntu 08.04 LTS "Hardy Heron" (hardy)',
     'jaunty': 'Ubuntu 09.04 "Jaunty Jackalope" (jaunty)',
@@ -29,6 +29,7 @@ releases = {
     'quantal': 'Ubuntu 12.10 "Quantal Quetzal" (quantal)',
     'raring': 'Ubuntu 13.04 "Raring Ringtail" (raring)',
     'saucy': 'Ubuntu 13.10 "Saucy Salamander" (saucy)',
+    'trusty': 'Ubuntu 14.04 "Trusty Tahr" (trusty)',
 }
 
 
@@ -60,9 +61,9 @@ if __name__ == '__main__':
         rstats[date] = rtime
         data[releases[release]] = rstats
     # determine the union of all timestamps
-    timestamps = sets.Set()
+    timestamps = set()
     for codename, stats in data.iteritems():
-        timestamps.union_update(stats.keys())
+        timestamps.update(stats.keys())
     export = [{'key': release,
                'values': [[ts, float(data[release].setdefault(ts, 0)) / 7]
                         for ts in sorted(timestamps)]}