MegaSquirt (And FreeEMS) CCN results

Discuss MegaSquirt, VEMS and other non-free hardware and software here.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: MegaSquirt CCN results

Post by Fred »

Actually, it's still not too bad, ms2e has some files with worse CCN than the whole of FreeEMS now. We have also got more lines of source than the base ms2 code and more than half the lines of the ms2e code. Something tells me that progress will start to pick up in the next few months as it becomes a useful ECU :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: MegaSquirt CCN results

Post by Fred »

Update to this ancient thread!

Total from the wc approximately represents function level break down, FreeEMS ~263 functions, MS2Extra 148 functions (excluding ASM).
Same total from find without pmccabe shows the file count, FreeEMS 166 files, MS2Extra 36 files (excluding ASM).
Then we have a line, word and char count showing the sheer quantity of text, FreeEMS 23412 lines, 1MB in total, MS2Extra 24827 lines, 0.8MB in total (including comments and white space, excluding ASM).
The total sum CCN numbers are tailed off and are FreeEMS 619 modified and 723 traditional, MS2Extra 2816 modified 2840 traditional (excluding ASM).
We also have a binary size summary for FreeEMS, 20k code, 43k data, but not ms2e as I CBF. The S19 for ms2e is 300k and for freeems is just 160k, though, so we'll roll with that.

FreeEMS:

Code: Select all

fred@cheetah:~/workspaces/eclipse/freeems-vanilla/src$ find . -name "*.h" -or -name "*.c" | xargs pmccabe -vtf | wc
    271    1725   12260
fred@cheetah:~/workspaces/eclipse/freeems-vanilla/src$ find . -name "*.h" -or -name "*.c" | wc
    166     166    4695
fred@cheetah:~/workspaces/eclipse/freeems-vanilla/src$ find . -name "*.h" -or -name "*.c" | xargs wc | tail -1
  23412  144124 1043786 total
fred@cheetah:~/workspaces/eclipse/freeems-vanilla/src$ find . -name "*.h" -or -name "*.c" | xargs pmccabe -vtf | tail -1
619	723	6346	n/a	23412	Total
Full pmccabe results: http://pastebin.com/RwgrPgVk

FreeEMS results from: m68hc11-size -t *.o
code 20369
data 43058
total 63427

Code: Select all

fred@cheetah:~/Downloads/ms2e/ms2extra_3.2.1_release/ms2extra$ find . -name "*.h" -or -name "*.c" -or -name "*.inc" | xargs pmccabe -vtf | wc
"./ms2_extra_init.c", line 1567: not enough }'s
    156    1050    7483
fred@cheetah:~/Downloads/ms2e/ms2extra_3.2.1_release/ms2extra$ find . -name "*.h" -or -name "*.c" -or -name "*.inc" | wc
     36      36     735
fred@cheetah:~/Downloads/ms2e/ms2extra_3.2.1_release/ms2extra$ find . -name "*.h" -or -name "*.c" -or -name "*.inc" | xargs wc | tail -1
 24827  92409 811752 total
fred@cheetah:~/Downloads/ms2e/ms2extra_3.2.1_release/ms2extra$ find . -name "*.h" -or -name "*.c" -or -name "*.inc" | xargs pmccabe -vtf | tail -1
"./ms2_extra_init.c", line 1567: not enough }'s
2816	2840	8918	n/a	24827	Total
Full pmccabe results: http://pastebin.com/gVCCgr3d

If anyone has their tools installed to build the object files and do a bin size comparison on it, please do.

Some approximate conclusions ignoring the significant effect of ASM on the MS2Extra code base:

MS2Extra has 20% less textual code and four times the cyclomatic complexity.
FreeEMS has 25% more textual code and four times the number of C source files.
MS2Extra has 20% less textual code and half the number of functions (very approximate).
FreeEMS has 25% more textual code and half the binary code image size.

It's no surprise that their code is fragile! :-(

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply