Skip to content

Instantly share code, notes, and snippets.

@reselbob
Last active September 29, 2020 00:20
Show Gist options
  • Save reselbob/af1707846df4cdcb5160aefa09510cd5 to your computer and use it in GitHub Desktop.
Save reselbob/af1707846df4cdcb5160aefa09510cd5 to your computer and use it in GitHub Desktop.
An analysis of which CNCF Graduated Project use gRPC

How Many CNCF Graduated Project uses gRPC?

Of the 11 graduated projects listed below 9 use gRPC

Methodology

The method used to determine if a project uses gRPC is to run the cloc line code analysis tool on the each of the code repository in GitHub of each of the projects graduated by the CNCF as listed here as of September 28, 2020. The only proejct that was omitted is TUF because it is a specification only.

cloc analyzes all the code in the repo and organizes the results according to file type. Also, it inspects each file discovered and analyzes the file and reports the number lines in the file, as blank, comment and active.

Cloc is invoked using the following command that executes a shell script.

sh cloc-git.sh <https://repo.url/repo-file.git>

WHERE

<https://repo.url/repo-file.git> is the URL to the GitHub repo file to the given graduated CNCF project

The code for the sheel script is as follows:

git clone --depth 1 "$1" temp-linecount-repo &&
  printf "('temp-linecount-repo' will be deleted automatically)\n\n\n" &&
  cloc temp-linecount-repo &&
  rm -rf temp-linecount-repo

Also, I conducted a word search on the term grpc in each of the repositories inspected. If the search result came back showing code that had a reference to a gRPC library or looked as if gRPC was used actively in the code, then the project deemed, Uses gRPC.

CoreDNS (233 Contributors)

Uses gRPC

     724 text files.
     721 unique files.
      68 files ignored.

github.com/AlDanial/cloc v 1.88  T=1.13 s (582.2 files/s, 54507.8 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Go                             537           6790           3606          42603
Markdown                       108           2068              0           6080
YAML                             7             21              6            202
make                             2             11              6             79
Bourne Shell                     1              3              2             10
Protocol Buffers                 1              3              0              9
Dockerfile                       1              4              0              8
-------------------------------------------------------------------------------
SUM:                           657           8900           3620          48991
-------------------------------------------------------------------------------

FluentD (201 Contributors)


     520 text files.
     517 unique files.
      73 files ignored.

github.com/AlDanial/cloc v 1.88  T=0.92 s (497.4 files/s, 101540.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Ruby                           419          12680           5571          71956
Markdown                        12            519              0           1787
ERB                             16             63              0            241
YAML                             8             24              7            230
JSON                             1              0              0             17
-------------------------------------------------------------------------------
SUM:                           456          13286           5578          74231
-------------------------------------------------------------------------------

Kubernetes (2875 Contributors)

Uses gRPC

   22262 text files.
   20664 unique files.
    3018 files ignored.

github.com/AlDanial/cloc v 1.88  T=405.83 s (47.5 files/s, 13787.8 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                            13731         448513         768353        3344071
JSON                            240              4              0         584381
Bazel                          3327          12056            149         132621
YAML                            798           1104           1164          93505
Markdown                        482          18203              0          62513
Bourne Shell                    313           5781          11239          28364
PO File                          11           1459           2135          16386
Assembly                        110           1990           2600          10895
Protocol Buffers                109           4935          15456           9553
PowerShell                        7            326            920           2062
make                             60            463            862           1555
C/C++ Header                      1            399           4367            839
Bourne Again Shell               12             88             74            767
Starlark                         13             75            361            740
Lua                               1             30             26            453
sed                               4              4             32            440
Dockerfile                       44            217            637            435
Python                            7            119            157            413
SVG                               4              4              4            378
TOML                             12            147            173            290
C                                 6             39             67            123
INI                               1              2              0             10
HTML                              2              0              0              2
--------------------------------------------------------------------------------
SUM:                          19295         495958         808776        4290796
--------------------------------------------------------------------------------

Jaeger (166 Contributors)

Uses gRPC

     967 text files.
     959 unique files.
      54 files ignored.

github.com/AlDanial/cloc v 1.88  T=1.82 s (503.2 files/s, 65029.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Go                             723          11680          13452          79471
JSON                            74              1              0           7466
Markdown                        25            705              1           1887
YAML                            41            118             24            910
Bourne Shell                    23            179             61            767
Python                           5             96             39            434
make                             2            101             37            420
Protocol Buffers                 4             44             64            154
Dockerfile                      14             41              8            103
HTML                             3             11              2            102
TOML                             1              0              0              4
JavaScript                       1              0              1              3
-------------------------------------------------------------------------------
SUM:                           916          12976          13689          91721
-------------------------------------------------------------------------------

containerd (273 Contributors)

Uses gRPC

    3252 text files.
    3192 unique files.
     234 files ignored.

github.com/AlDanial/cloc v 1.88  T=11.15 s (271.6 files/s, 84300.5 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                             2712          76295         103474         720114
Markdown                        154           4216              0          12777
Protocol Buffers                 63           2034           7936           4452
Assembly                         48            377            453           2038
C                                16            349            512           1440
YAML                             11            189             79           1239
TOML                              6            133             67            396
Bourne Again Shell               11             86            136            285
make                              1             71             24            275
Bourne Shell                      3             45             86            199
C/C++ Header                      2             11             17             41
Dockerfile                        1              9              9             38
--------------------------------------------------------------------------------
SUM:                           3028          83815         112793         743294
--------------------------------------------------------------------------------

Envoy (593 Contributors)

Uses gRPC


    7155 text files.
    6237 unique files.
    1776 files ignored.

github.com/AlDanial/cloc v 1.88  T=15.21 s (355.8 files/s, 51595.2 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
C++                            1670          65046          30390         349177
C/C++ Header                   1404          23595          36127          84565
Bazel                           738           4280            649          39915
Protocol Buffers                602          13315          33972          26134
reStructuredText                388           5529           7260          12738
Python                          102           2607           3356           9620
YAML                            142            174            102           6940
Markdown                         91           1946              0           6440
SVG                              42             35             71           5716
Bourne Shell                    110            901            728           3540
Starlark                         32            366            549           3407
JSON                             39              1              0           2353
diff                             15             58            428            498
JavaScript                        2             52            101            458
Go                                8             71             28            299
Bourne Again Shell                7             74            139            297
HTML                              2              4              0            148
PowerShell                        2             11              0             79
Dockerfile                        7             25             12             59
Thrift                            1              7              3             30
Rust                              1              6              7             24
CSS                               1              3              4             18
Lisp                              1              1             11             11
make                              2              2              0             11
Lua                               1              2              0              5
--------------------------------------------------------------------------------
SUM:                           5410         118111         113937         552482
--------------------------------------------------------------------------------

Harbor (201 Contributors)

Uses gRPC

    6990 text files.
    6813 unique files.
Complex regular subexpression recursion limit (32766) exceeded at /usr/local/Cellar/cloc/1.88/libexec/bin/cloc line 10408.
     576 files ignored.

github.com/AlDanial/cloc v 1.88  T=22.17 s (290.6 files/s, 72936.2 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                             4701         133022         191542        1094709
TypeScript                      500           4007           3963          42560
JSON                             45             21              0          37679
Markdown                        327           6255              0          17856
YAML                            117            287            112          11466
HTML                            141            116             46           7957
RobotFramework                   84           1175           1135           7088
Protocol Buffers                 63           3575          11629           5891
Python                           99           1373           1181           5868
Sass                            121            770             10           5801
Jinja Template                   30            209              0           2840
Bourne Shell                     76            517            697           2357
C/C++ Header                      3            567            661           1876
Assembly                         37            272            326           1606
XML                               1              0              0           1370
make                             20            325            203           1232
SQL                              16            150            208            990
diff                              2              8             97            875
Bourne Again Shell               11            106             75            584
Dockerfile                       25            171             38            564
SVG                               8              0              0            186
JavaScript                        5             18             30            145
CSS                               1              8              1             69
Starlark                          2              4             37             36
TOML                              4             15             85             29
C                                 1              8              7             24
INI                               1              2              0             10
--------------------------------------------------------------------------------
SUM:                           6441         152981         212083        1251668
--------------------------------------------------------------------------------

Helm (701 Contributors)

    1123 text files.
     822 unique files.
     520 files ignored.

github.com/AlDanial/cloc v 1.88  T=1.61 s (400.3 files/s, 38244.7 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                              356           7603           8705          37180
YAML                            238            185            502           3706
Markdown                         24            493              0           1864
Bourne Again Shell                2             56             79            438
Bourne Shell                     17             85            130            271
make                              1             41             26            145
JSON                              6              0              0            103
SVG                               1              0              0              8
--------------------------------------------------------------------------------
SUM:                            645           8463           9442          43715
--------------------------------------------------------------------------------

Prometheus (524 Contributors)

Uses gRPC

    5279 text files.
    5024 unique files.
     661 files ignored.

github.com/AlDanial/cloc v 1.88  T=21.35 s (216.9 files/s, 82159.8 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                             3902         146618         279352        1133399
JSON                             20              0              0          76495
CSS                              25           1596             66          17456
Markdown                        183           5585              0          16312
YAML                            198            765            447          13214
JavaScript                       26           3005           2862          12871
TypeScript                       75            540             71           5986
Protocol Buffers                 62           3333          11010           5866
LESS                              1            269              2           3620
SVG                               6              0             12           3121
Assembly                         47            562            919           2809
HTML                             17             76             37            988
Bourne Shell                     19            157            425            964
yacc                              1             90             65            555
make                             19            146            157            513
Bourne Again Shell                3             45             57            401
Bazel                            12             38              0            328
Starlark                          2             32             50            151
lex                               2             29              0            151
TOML                              5             24             90             63
Dockerfile                        2             12              9             59
C                                 1              8              7             24
INI                               1              2              0             10
XML                               2              0              0              2
--------------------------------------------------------------------------------
SUM:                           4631         162932         295638        1295358
--------------------------------------------------------------------------------

TiKV (257 Contributors)

Uses gRPC

     920 text files.
     913 unique files.
      25 files ignored.

github.com/AlDanial/cloc v 1.88  T=3.44 s (260.9 files/s, 100336.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Rust                           746          26965          18091         235795
JSON                             6              0              0          46975
Markdown                        71           2990              0           8471
TOML                            60            553            746           3001
YAML                             6             36              0            475
make                             2             71            114            244
Bourne Shell                     3             47             48            170
Python                           1             16             11            101
Groovy                           1              2              0              9
SVG                              1              0              0              1
-------------------------------------------------------------------------------
SUM:                           897          30680          19010         295242
-------------------------------------------------------------------------------

Vitness (241 Contributors)

Uses gRPC

    2692 text files.
    2581 unique files.
     288 files ignored.

github.com/AlDanial/cloc v 1.88  T=7.32 s (330.1 files/s, 77078.1 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Go                             1767          54572          61126         340538
JSON                             47              2              0          20308
Java                             76           3668           3479          18345
YAML                             66            419            356           9651
CSS                              20            297             42           7348
JavaScript                       37            550            323           6846
Markdown                         60           2178              0           4790
TypeScript                       52            528            314           3777
yacc                              1            247            145           3471
SVG                               3              0              0           3208
Bourne Shell                    123            931           1924           2500
Smarty                            8            317              0           1956
Protocol Buffers                 26            814           1698           1719
Python                            5            151            143           1350
Maven                             5             53             26            695
HTML                             18             34             18            662
SQL                              50             79             82            576
Bourne Again Shell               19            135            257            492
Dockerfile                       23            154            344            318
make                              5            102             79            289
Pascal                            1              9             34             25
XML                               6              5              0             21
--------------------------------------------------------------------------------
SUM:                           2418          65245          70390         428885
--------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment