Skip to content

Instantly share code, notes, and snippets.

@udoprog
Last active September 7, 2024 09:20
Show Gist options
  • Save udoprog/f7ed9f90ac180a5597cf7498bd4b0fc3 to your computer and use it in GitHub Desktop.
Save udoprog/f7ed9f90ac180a5597cf7498bd4b0fc3 to your computer and use it in GitHub Desktop.
Script for counting line statistics in https://github.com/udoprog/kernelstats
import gzip
import json
import os
dir = "stats"
print('version, lines')
for n in sorted(os.listdir(dir)):
with gzip.open(os.path.join(dir, n)) as f:
data = json.load(f)
tag = data['tag']
total = 0
for k in data["all"]:
v = data["all"][k]
total += v["code"] + v["comments"]
print(f'{tag}, {total}')
version lines
v0.01 9239
v0.11 12491
v0.12 17110
v0.95 18507
v0.99.11 98575
v0.99.12 105897
v0.99.13 107016
v0.99.15 148780
v1.0 150769
v1.1.0 150507
v1.1.23 168330
v1.1.52 198188
v1.1.70 214053
v1.1.80 232381
v1.1.90 255750
v1.2.0 259962
v1.2.10 263207
v1.3.0 283161
v1.3.10 319440
v1.3.20 325807
v1.3.30 346563
v1.3.40 363580
v1.3.50 407266
v1.3.60 436737
v1.3.70 462743
v1.3.80 488575
v1.3.90 504152
v2.0 612445
v2.1.0 627739
v2.2.0 1429717
v2.3.0 1507301
v2.4.0 2630061
v2.4.10 3065510
v2.4.20 3745241
v2.4.30 4306952
v2.5.0 3192135
v2.5.10 3704403
v2.5.20 3761559
v2.5.30 3817245
v2.5.40 3999556
v2.5.50 4313500
v2.5.60 4370197
v2.5.70 4476041
v2.6.0 4650218
v2.6.1 4634741
v2.6.10 5085008
v2.6.11 5183577
v2.6.12 5306231
v2.6.13 5472027
v2.6.14 5607046
v2.6.15 5716446
v2.6.16 5872469
v2.6.17 5961592
v2.6.18 6077095
v2.6.19 6258178
v2.6.2 4710622
v2.6.20 6357117
v2.6.21 6470881
v2.6.22 6692095
v2.6.23 6759777
v2.6.24 7162295
v2.6.25 7449924
v2.6.26 7577044
v2.6.27 7744517
v2.6.28 8125147
v2.6.29 8768367
v2.6.3 4750416
v2.6.30 9274476
v2.6.31 9623496
v2.6.32 10096708
v2.6.33 10358195
v2.6.34 10618269
v2.6.35 10964612
v2.6.36 11224124
v2.6.37 11657605
v2.6.38 11907223
v2.6.39 12181760
v2.6.4 4781649
v2.6.5 4821763
v2.6.6 4877783
v2.6.7 4891314
v2.6.8 4971053
v2.6.9 5071695
v3.0 12262016
v3.1 12377020
v3.10 14286901
v3.11 14673173
v3.12 14945899
v3.13 15113996
v3.14 15389829
v3.15 15675187
v3.16 15895762
v3.17 15885843
v3.18 16008485
v3.19 16121054
v3.2 12575300
v3.3 12764175
v3.4 12949317
v3.5 13129608
v3.6 13360045
v3.7 13638356
v3.8 13829419
v3.9 14056355
v4.0 16275552
v4.1 16443598
v4.10 19404087
v4.11 19664445
v4.12 20596440
v4.13 21145107
v4.14 21362574
v4.15 21641906
v4.16 21801340
v4.17 21681357
v4.18 21593996
v4.19 21872774
v4.2 17168284
v4.20 44165858
v4.3 17438023
v4.4 17649093
v4.5 17894234
v4.6 18124152
v4.7 18383585
v4.8 18699219
v4.9 18950110
v5.0 44584258
v5.1 45001766
v5.10 50688012
v5.11 51805766
v5.12 52158978
v5.13 52857638
v5.14 53866210
v5.15 54429690
v5.16 55169494
v5.17 55599774
v5.18 56987102
v5.19 58467196
v5.2 45139122
v5.3 46229524
v5.4 46965142
v5.5 47500076
v5.6 48036318
v5.7 48491360
v5.8 49392838
v5.9 50233794
v6.0 60484350
v6.1 61215688
v6.10 66605226
v6.2 61747192
v6.3 61993252
v6.4 62727380
v6.5 63361306
v6.6 63815076
v6.7 64836112
v6.8 65385772
v6.9 66200580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment