microsoft / MPI.NET
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 353 units with 7,262 lines of code in units (70.4% of code).
    • 7 very long units (1,281 lines of code)
    • 23 long units (1,446 lines of code)
    • 80 medium size units (2,387 lines of code)
    • 88 small units (1,306 lines of code)
    • 155 very small units (842 lines of code)
17% | 19% | 32% | 17% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs14% | 22% | 33% | 18% | 12%
c56% | 0% | 24% | 10% | 8%
pl0% | 0% | 81% | 18% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
MPI8% | 25% | 33% | 19% | 12%
Benchmarks/NetPipe56% | 0% | 24% | 10% | 8%
Benchmarks/Netpipe_cs57% | 0% | 26% | 14% | 1%
Benchmarks/netpipe_cs_generic57% | 0% | 26% | 14% | 1%
Benchmarks/netpipe_cs_tortoise54% | 0% | 28% | 15% | 2%
Benchmarks/netpipe_cs_hare53% | 0% | 28% | 15% | 2%
Benchmarks/Netcoll_cs0% | 27% | 56% | 11% | 5%
TestCommons0% | 0% | 33% | 0% | 66%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int main()
in Benchmarks/NetPipe/netmpi.c
363 75 2
306 5 6
public void ReduceScatter()
in MPI/Intercommunicator.cs
170 22 4
static void Main()
in Benchmarks/Netpipe_cs/Netpipe_cs.cs
118 22 1
static void Main()
in Benchmarks/netpipe_cs_generic/Netpipe_cs.cs
118 22 1
static void Main()
in Benchmarks/netpipe_cs_tortoise/Netpipe_cs.cs
105 21 1
static void Main()
in Benchmarks/netpipe_cs_hare/Netpipe_cs.cs
101 20 1
public Environment()
in MPI/Environment.cs
98 18 2
public void ReduceScatter()
in MPI/Intracommunicator.cs
88 16 4
public void AlltoallFlattened()
in MPI/Intercommunicator.cs
85 13 4
static void Main()
in Benchmarks/Netcoll_cs/netcoll_cs.cs
76 22 1
public void Reduce()
in MPI/Intercommunicator.cs
76 12 4
public void ScatterFromFlattened()
in MPI/Intercommunicator.cs
74 15 4
public void AllgatherFlattened()
in MPI/Intercommunicator.cs
66 13 3
65 9 0
61 11 4
public void ScatterFromFlattened()
in MPI/Intracommunicator.cs
60 12 4
58 12 6
public void Alltoall()
in MPI/Intercommunicator.cs
58 9 2
public void AlltoallFlattened()
in MPI/Intracommunicator.cs
55 12 4