[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#782171: Initial performance investigation



Heya,

I started looking at this since cloc would also be able to provide a
matching between files and programming language.

I tested cloc directly on the testdata folder and here are some results:

time sloccount --addlangall testdata/
real    0m10.920s
user    0m2.768s
sys     0m2.656s

time cloc testdata/
real    0m34.636s
user    0m16.188s
sys     0m6.612s

time cloc --by-file-by-lang -csv testdata/
real    0m35.695s
user    0m16.764s
sys     0m6.788s

The last one provides an output matching each file with a programming
language.

Besides the time difference one needs to also notice the difference in
results. Cloc has many more languages but also categorizes sourcecode
differently. I.e instead of ansic it has C and C headers.
It also splits results into source code, blank lines and comments. I
haven't investigated what sloccount does for that matter.

On a plus side cloc can output json or csv so parsing the output would
be easy.

Cheers,

Orestis

Attachment: signature.asc
Description: PGP signature


Reply to: