microsoft / Trill
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 3,323 units with 61,991 lines of code in units (70.7% of code).
    • 70 very long units (11,886 lines of code)
    • 164 long units (11,407 lines of code)
    • 550 medium size units (17,225 lines of code)
    • 767 small units (11,287 lines of code)
    • 1,772 very small units (10,186 lines of code)
19% | 18% | 27% | 18% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs19% | 18% | 27% | 18% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Sources/Core/Microsoft.StreamProcessing/Operators30% | 21% | 23% | 13% | 11%
Sources/Core/Microsoft.StreamProcessing/Ingress17% | 19% | 33% | 19% | 10%
Sources/Core/Microsoft.StreamProcessing/StreamableAPI8% | 26% | 28% | 11% | 25%
Sources/Core/Microsoft.StreamProcessing/StringHandling8% | 25% | 37% | 14% | 14%
Sources/Core/Microsoft.StreamProcessing/Utilities4% | 10% | 17% | 43% | 24%
Sources/Core/Microsoft.StreamProcessing/Fusible0% | 41% | 38% | 11% | 7%
Sources/Core/Microsoft.StreamProcessing/Transformer0% | 16% | 48% | 18% | 15%
Sources/Core/Microsoft.StreamProcessing/Serializer0% | 10% | 35% | 24% | 30%
Sources/Core/Microsoft.StreamProcessing/Scheduler0% | 35% | 0% | 20% | 44%
Sources/Core/Microsoft.StreamProcessing/Pipes0% | 15% | 24% | 23% | 36%
Sources/Core/Microsoft.StreamProcessing/CacheUtilities0% | 37% | 34% | 9% | 19%
Sources/Core/Microsoft.StreamProcessing/Collections0% | 1% | 38% | 35% | 23%
Sources/Core/Microsoft.StreamProcessing/StreamProperties0% | 7% | 46% | 23% | 22%
Sources/Core/Microsoft.StreamProcessing/Egress0% | 0% | 39% | 28% | 31%
Sources/Core/Microsoft.StreamProcessing0% | 0% | 52% | 10% | 36%
Sources/Core/Microsoft.StreamProcessing/Aggregates0% | 0% | 22% | 45% | 31%
Sources/Core/Microsoft.StreamProcessing.Provider0% | 0% | 33% | 47% | 18%
Sources/Core/Microsoft.StreamProcessing/Sharding0% | 0% | 0% | 51% | 48%
Sources/Core/Microsoft.StreamProcessing/Events0% | 0% | 0% | 22% | 77%
Sources/Core/Microsoft.StreamProcessing/Streamables0% | 0% | 0% | 27% | 72%
Sources/Core/Microsoft.StreamProcessing.Provider/Extensions0% | 0% | 0% | 100% | 0%
Sources/Core/Microsoft.StreamProcessing/Windows0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledPartitionedAfaPipe_MultiEventList.cs
422 113 1
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledGroupedAfaPipe_MultiEventList.cs
420 114 0
public override unsafe void OnNext()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledPartitionedAfaPipe_SingleEvent.cs
385 76 1
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_MultiEventList.cs
361 110 0
public override unsafe void OnNext()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledGroupedAfaPipe_SingleEvent.cs
297 62 1
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledPartitionedAfaPipe_EventList.cs
269 74 1
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledGroupedAfaPipe_EventList.cs
266 74 0
public override unsafe void OnNext()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_SingleEvent.cs
255 50 1
protected override void ProcessBothBatches()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/IncreasingOrder/IncreasingOrderEquiJoinPipe.cs
246 48 6
internal static Tuple Generate()
in Sources/Core/Microsoft.StreamProcessing/Operators/GroupedWindow/GroupedWindowTransformer.cs
232 22 1
internal static Tuple Generate()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/EquijoinTransformer.cs
230 27 2
private void ProcessCurrentTimestamp()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedAfaPipe_EventList.cs
225 71 0
public override unsafe void OnNext()
in Sources/Core/Microsoft.StreamProcessing/Operators/Afa/CompiledUngroupedDAfaPipe_SingleEvent.cs
220 35 1
public static Tuple Generate()
in Sources/Core/Microsoft.StreamProcessing/Operators/SnapshotWindow/AggregateTempateClasses.cs
213 27 2
internal static Tuple Generate()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/FixedIntervalEquijoinTransformer.cs
203 20 2
private void ProcessPendingEntries()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipeCompound.cs
179 25 0
private void ProcessPendingEntries()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/Basic/PartitionedEquiJoinPipe.cs
175 25 0
private void ProcessPendingEntries()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/StartEdge/PartitionedStartEdgeEquiJoinPipe.cs
175 32 0
private void ProcessPendingEntries()
in Sources/Core/Microsoft.StreamProcessing/Operators/EquiJoin/FixedInterval/PartitionedFixedIntervalEquiJoinPipeCompound.cs
173 25 0
private void Action()
in Sources/Core/Microsoft.StreamProcessing/Ingress/Temporal/TemporalIngressSubscription.cs
171 35 4