aws / chrony-candm
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 53 units with 470 lines of code in units (23.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (194 lines of code)
    • 7 small units (102 lines of code)
    • 41 very small units (174 lines of code)
0% | 0% | 41% | 21% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 0% | 41% | 21% | 37%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
chrony-candm/src0% | 0% | 33% | 20% | 46%
chrony-candm-derive/src0% | 0% | 60% | 24% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
fn blocking_query_loop()
in chrony-candm/src/net.rs
47 6 3
fn derive_chrony_serialize_struct()
in chrony-candm-derive/src/lib.rs
46 5 2
fn from()
in chrony-candm/src/common.rs
42 10 1
fn derive_chrony_serialize_enum()
in chrony-candm-derive/src/lib.rs
38 4 3
fn deserialize_unchecked()
in chrony-candm/src/common.rs
21 3 1
fn serialize()
in chrony-candm/src/common.rs
20 2 2
fn parse_pad_attr()
in chrony-candm-derive/src/lib.rs
17 5 1
fn parse_cmd_attr()
in chrony-candm-derive/src/lib.rs
17 5 1
fn from()
in chrony-candm/src/common.rs
13 3 1
fn poll()
in chrony-candm/src/async_net.rs
13 1 2
fn deserialize_unchecked()
in chrony-candm/src/common.rs
11 2 1
fn new()
in chrony-candm/src/net.rs
11 1 0
fn length()
in chrony-candm/src/common.rs
10 2 0
fn default()
in chrony-candm/src/reply.rs
8 1 0
fn body_length()
in chrony-candm/src/common.rs
8 2 1
fn drop()
in chrony-candm/src/net.rs
8 3 1
fn drop()
in chrony-candm/src/async_net.rs
8 3 1
fn fmt()
in chrony-candm/src/common.rs
6 1 2
fn from()
in chrony-candm/src/common.rs
6 1 1
fn default()
in chrony-candm/src/net.rs
6 1 0