您最大的Grails项目的“grails stats”的输出是多少?

时间:2011-02-13 15:00:10

标签: grails

grails stats为给定的Grails项目提供各种代码统计信息。

典型输出看起来像是:

+----------------------+-------+-------+
| Name                 | Files |  LOC  |
+----------------------+-------+-------+
| Controllers          |     4 |   183 | 
| Domain Classes       |     8 |   264 | 
| Jobs                 |     1 |    10 | 
| Services             |     4 |   297 | 
| Tag Libraries        |     2 |    63 | 
| Unit Tests           |    17 |   204 | 
+----------------------+-------+-------+
| Totals               |    36 |  1021 | 
+----------------------+-------+-------+

我很好奇Grails项目中各种工件之间的典型代码划分(例如比率LOC(控制器)/ LOC(服务)等)。

请分享您最大的Grails项目的grails stats输出,以便为此问题提供统计信息。

4 个答案:

答案 0 :(得分:3)

我目前的项目:

+----------------------+-------+-------+
| Name                 | Files |  LOC  |
+----------------------+-------+-------+
| Controllers          |    67 |  7665 | 
| Domain Classes       |   101 |  3736 | 
| Jobs                 |     3 |    45 | 
| Services             |    61 |  6158 | 
| Tag Libraries        |    34 |  2357 | 
| Groovy Helpers       |    54 |  3356 | 
| Java Helpers         |     1 |    65 | 
| Unit Tests           |   227 | 24224 | 
| Integration Tests    |    70 | 10908 | 
| Scripts              |     2 |    77 | 
+----------------------+-------+-------+
| Totals               |   620 | 58591 | 
+----------------------+-------+-------+

答案 1 :(得分:2)

“Java Helpers”中的大量数字主要源自wsdl2java存根生成。

+----------------------+-------+-------+
| Name                 | Files |  LOC  |
+----------------------+-------+-------+
| Controllers          |    13 |  1085 | 
| Domain Classes       |    17 |   802 | 
| Services             |    19 |  1918 | 
| Tag Libraries        |     2 |   182 | 
| Groovy Helpers       |    39 |  1586 | 
| Java Helpers         |   521 | 42232 | 
| Unit Tests           |    45 |  5294 | 
| Integration Tests    |     9 |   836 | 
| Scripts              |     2 |    22 | 
+----------------------+-------+-------+
| Totals               |   667 | 53957 | 
+----------------------+-------+-------+

答案 2 :(得分:2)

+----------------------+-------+-------+
| Name                 | Files |  LOC  |
+----------------------+-------+-------+
| Controllers          |    40 |  3912 |
| Domain Classes       |    42 |  2109 |
| Jobs                 |     5 |   127 |
| Services             |    18 |  2352 |
| Tag Libraries        |    12 |   355 |
| Groovy Helpers       |   158 |  5249 |
| Java Helpers         |     4 |   207 |
| Unit Tests           |    54 |  3258 |
| Integration Tests    |    22 |  1790 |
| Scripts              |     7 |   150 |
+----------------------+-------+-------+
| Totals               |   362 | 19509 |
+----------------------+-------+-------+

遗憾的是,它没有更多的统计数据,如每班的平均/最小/最大LOC,测试覆盖率等;)

答案 3 :(得分:2)

+----------------------+-------+-------+
| Name                 | Files |  LOC  |
+----------------------+-------+-------+
| Controllers          |    17 |  1961 | 
| Domain Classes       |    14 |   843 | 
| Jobs                 |     4 |   109 | 
| Services             |     5 |   831 | 
| Tag Libraries        |     2 |   789 | 
| Groovy Helpers       |    38 |   948 | 
| Java Helpers         |     5 |   445 | 
| Unit Tests           |     1 |    12 | 
| Integration Tests    |     1 |    33 | 
| Scripts              |     1 |    11 | 
+----------------------+-------+-------+
| Totals               |    88 |  5982 | 
+----------------------+-------+-------+

小应用程序(约25个故事)