1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
@page
@node Example Output
@chapter Example Output
@cindex Example Output
This is a self-referential example. This output was obtained by
going into the complexity source directory and running the command:
@example
complexity --histogram --score --thresh=3 *.c
@end example
The @code{--threshold} is set to three because all of the functions
score below the default threshold of 30. It is not zero because
there are too many trivial (0, 1 or 2) functions for a short example.
@noindent
This results in:
@example
Complexity Scores
Score | ln-ct | nc-lns| file-name(line): proc-name
3 19 16 tokenize.c(553): skip_params
3 22 17 tokenize.c(79): check_quote
3 28 21 score.c(105): handle_stmt_block
3 33 21 opts.c(920): translate_option_strings
3 27 22 tokenize.c(158): hash_check
3 28 23 tokenize.c(121): comment_check
3 37 27 complexity.c(47): initialize
3 43 35 score.c(546): handle_TKN_KW_DO
4 20 16 tokenize.c(439): next_nonblank
4 25 19 tokenize.c(24): skip_comment
4 25 20 tokenize.c(580): skip_to_semi
4 37 32 tokenize.c(365): keyword_check
4 54 42 complexity.c(330): load_file
5 33 28 score.c(499): handle_TKN_KW_CASE
5 40 32 score.c(326): handle_parms
5 55 39 complexity.c(270): popen_unifdef
5 65 42 opts.c(687): main
5 61 47 complexity.c(470): do_proc
5 66 47 score.c(782): score_proc
5 63 51 score.c(152): fiddle_subexpr_score
5 77 57 score.c(594): handle_TKN_KW_IF
7 53 42 score.c(676): handle_TKN_KW_FOR
8 73 57 complexity.c(114): print_histogram
10 57 50 tokenize.c(610): find_proc_start
10 234 179 opts.c(957): bogus_function
13 103 73 score.c(377): handle_expression
14 90 65 score.c(226): handle_subexpr
25 84 68 tokenize.c(464): next_token
Complexity Histogram
Score-Range Lin-Ct
0-9 753 **********************************************
10-19 367 *****************************
20-29 68 *****
Scored procedure ct: 28
Non-comment line ct: 1188
Average line score: 8
25%-ile score: 4 (75% in higher score procs)
50%-ile score: 5 (half in higher score procs)
75%-ile score: 10 (25% in higher score procs)
Highest score: 25 (next_token() in tokenize.c)
@end example
|