microsoft / AppCenter-Test-Espresso-Extensions
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 47 units with 366 lines of code in units (69.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (87 lines of code)
    • 7 small units (97 lines of code)
    • 37 very small units (182 lines of code)
0% | 0% | 23% | 26% | 49%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 23% | 26% | 49%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
espresso0% | 0% | 38% | 30% | 30%
event0% | 0% | 10% | 22% | 66%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void run()
in src/main/java/com/microsoft/appcenter/espresso/EventServer.java
41 7 0
public boolean sendSync()
in src/main/java/com/microsoft/appcenter/espresso/EventServer.java
25 6 1
public void reportJunit()
in src/main/java/com/microsoft/appcenter/event/EventReporter.java
21 4 3
private static Bundle getArguments()
in src/main/java/com/microsoft/appcenter/espresso/Factory.java
17 7 0
private Event()
in src/main/java/com/microsoft/appcenter/event/Event.java
17 7 5
protected void commit()
in src/main/java/com/microsoft/appcenter/event/StdOutEventReporter.java
16 4 1
static
in src/main/java/com/microsoft/appcenter/espresso/Factory.java
14 3 0
static String readLine()
in src/main/java/com/microsoft/appcenter/espresso/EventServer.java
11 4 1
public LocalSocketEventReporter()
in src/main/java/com/microsoft/appcenter/espresso/LocalSocketEventReporter.java
11 2 2
private String shortId()
in src/main/java/com/microsoft/appcenter/event/ShortIdentifier.java
11 2 1
public void stop()
in src/main/java/com/microsoft/appcenter/espresso/EventServer.java
9 2 0
private String getParameters()
in src/main/java/com/microsoft/appcenter/event/EventReporter.java
9 3 1
public void reportLabel()
in src/main/java/com/microsoft/appcenter/event/EventReporter.java
9 2 4
public void reportScreenshot()
in src/main/java/com/microsoft/appcenter/event/EventReporter.java
9 2 3
private String mostSignificantSubstring()
in src/main/java/com/microsoft/appcenter/event/ShortIdentifier.java
9 2 2
private String filenameSafeHash()
in src/main/java/com/microsoft/appcenter/event/ShortIdentifier.java
9 2 1
public static Event createLabel()
in src/main/java/com/microsoft/appcenter/event/Event.java
8 3 5
public boolean hasId()
in src/main/java/com/microsoft/appcenter/event/MemoryEventReporter.java
8 3 1
private void ensureOnlyOneReporter()
in src/main/java/com/microsoft/appcenter/espresso/ReportHelper.java
7 3 0
public ShortIdentifier()
in src/main/java/com/microsoft/appcenter/event/ShortIdentifier.java
6 3 1