Get stats on your Ruby on Rails code Kumuha ng stats sa iyong Ruby sa daang-bakal code
Run this command from a command prompt inside your project directory: Patakbuhin ang command na ito mula sa isang command prompt sa loob ng iyong proyekto na direktoryo ng:
rake stats magsaliksik ng stats
You should see output that looks similar to this, although the lines of code will probably be different, since this is just a test project. Dapat mong makita ang output na mukhang katulad na ito, bagaman ang mga linya ng code ay maaaring mangyari iba, dahil ito ay lamang ng isang pagsubok sa proyekto. =) =)
+----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | Pangalan | linya | LOC | Mga Pag-aaral | Methods | M / C | LOC / M | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Helpers | 18 | 17 | 0 | 1 | 0 | 15 | | Katulong | 18 | 17 | 0 | 1 | 0 | 15 | | Controllers | 190 | 162 | 5 | 23 | 4 | 5 | | Controllers | 190 | 162 | 5 | 23 | 4 | 5 | | Components | 0 | 0 | 0 | 0 | 0 | 0 | | Components | 0 | 0 | 0 | 0 | 0 | 0 | | Functional tests | 169 | 125 | 8 | 23 | 2 | 3 | | Pagganap na mga pagsusulit | 169 | 125 | 8 | 23 | 2 | 3 | | Models | 156 | 129 | 6 | 18 | 3 | 5 | | Models | 156 | 129 | 6 | 18 | 3 | 5 | | Unit tests | 110 | 85 | 5 | 12 | 2 | 5 | | Unit pagsusulit | 110 | 85 | 5 | 12 | 2 | 5 | | Libraries | 0 | 0 | 0 | 0 | 0 | 0 | | Silid-Aklatan | 0 | 0 | 0 | 0 | 0 | 0 | | Integration tests | 44 | 35 | 1 | 2 | 2 | 15 | | Pagsasama-sama ng mga pagsusulit | 44 | 35 | 1 | 2 | 2 | 15 | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ | Total | 687 | 553 | 25 | 79 | 3 | 5 | | Kabuuan | 687 | 553 | 25 | 79 | 3 | 5 | +----------------------+-------+-------+---------+---------+-----+-------+ +----------------------+-------+-------+---------+ ---------+-----+-------+ Code LOC: 308 Test LOC: 245 Code to Test Ratio: 1:0.8 Code ng LOC: 308 Test LOC: 245 Code sa Test Ratio: 1:0.8

Daily Email Updates Araw-araw na Updates Email
You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:


