microsoft / service-fabric
File Size

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

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 14,259 files with 2,093,274 lines of code.
    • 319 very long files (738,190 lines of code)
    • 461 long files (319,034 lines of code)
    • 1,294 medium size files (403,228 lines of codeclsfd_ftr_w_mp_ins)
    • 1,759 small files (247,688 lines of code)
    • 10,426 very small files (385,134 lines of code)
35% | 15% | 19% | 11% | 18%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cpp41% | 17% | 20% | 10% | 9%
h32% | 10% | 15% | 12% | 30%
cs21% | 16% | 22% | 15% | 24%
c68% | 14% | 9% | 1% | 5%
man97% | 0% | 0% | 2% | 0%
ps1xml99% | 0% | 0% | 0% | <1%
inl48% | 32% | 14% | 1% | 3%
pl0% | 55% | 21% | 0% | 22%
py0% | 0% | 74% | 0% | 25%
ps10% | 0% | 22% | 44% | 33%
props0% | 0% | 0% | 42% | 57%
js0% | 0% | 0% | 60% | 39%
html0% | 0% | 0% | 100% | 0%
targets0% | 0% | 0% | 0% | 100%
cmd0% | 0% | 0% | 0% | 100%
proj0% | 0% | 0% | 0% | 100%
psd10% | 0% | 0% | 0% | 100%
yml0% | 0% | 0% | 0% | 100%
pm0% | 0% | 0% | 0% | 100%
cfg0% | 0% | 0% | 0% | 100%
spec0% | 0% | 0% | 0% | 100%
sfproj0% | 0% | 0% | 0% | 100%
csdef0% | 0% | 0% | 0% | 100%
awk0% | 0% | 0% | 0% | 100%
cscfg0% | 0% | 0% | 0% | 100%
cmake0% | 0% | 0% | 0% | 100%
cdf0% | 0% | 0% | 0% | 100%
hpp0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src/prod/src33% | 15% | 19% | 12% | 19%
src/prod/ktl57% | 17% | 16% | 5% | 3%
src/prod/manifests100% | 0% | 0% | 0% | 0%
src/prod/shared43% | 22% | 22% | 6% | 4%
src/prod/tools0% | 74% | 20% | 0% | 5%
src/properties/ktl0% | 0% | 0% | 65% | 34%
src/prod/linuxsetup0% | 0% | 0% | 46% | 53%
src/properties0% | 0% | 0% | 10% | 89%
src/properties/NetStandard0% | 0% | 0% | 0% | 100%
src/prod/Setup0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
tools/ci0% | 0% | 0% | 0% | 100%
src/properties/linux0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
FabricClient.h
in src/prod/src/prebuilt/sdk
20395 -
ComFabricClient.cpp
in src/prod/src/api/wrappers
17301 1308
isolationpriv.h
in src/prod/src/inc/clr
11980 -
man
Microsoft-ServiceFabric-LeaseEvents.man
in src/prod/manifests/components
11784 -
FabricClientImpl.cpp
in src/prod/src/client
10267 506
NativeClient.cs
in src/prod/src/managed/Api/src/System/Fabric/Interop
8579 73
ClusterManagerReplica.cpp
in src/prod/src/Management/ClusterManager
8123 174
ManagedEventSources.cs
in src/prod/src/managed/Api/src/System/Fabric/Common/Tracing
7881 720
NativeTypes.cs
in src/prod/src/managed/Api/src/System/Fabric/Interop
7615 23
FabricRuntime.h
in src/prod/src/prebuilt/sdk
7389 -
ServiceGroup.StatefulService.cpp
in src/prod/src/ServiceGroup/Service
6060 100
OverlayStream.cpp
in src/prod/src/ktllogger/sys/ktlshim
6012 20
Test.StateMachine.cpp
in src/prod/src/Reliability/Failover/ra
5982 233
ProcessActivationManager.cpp
in src/prod/src/Hosting2
5792 180
FabricTypes.h
in src/prod/src/prebuilt/sdk
5774 125
PlacementAndLoadBalancing.cpp
in src/prod/src/Reliability/LoadBalancing
5329 112
kblockfile.cpp
in src/prod/ktl/src/src
5241 1
khttpserver.cpp
in src/prod/ktl/src/src
5034 3
ReplicatedStore.cpp
in src/prod/src/Store
4992 206
pal.h
in src/prod/src/inc/clr/pal
4945 10
GlobalObj.h
in src/prod/src/ktllogger/sys/ktlshim
4926 201
LeasLayr.c
in src/prod/src/Lease/sys
4892 5
FabricSerializationHelper.h
in src/prod/src/Common
4875 153
TStore.cs
in src/prod/src/managed/Microsoft.ServiceFabric.Data.Impl/ReplicatedStore/DifferentialStore
4872 104
FabricActivatorClient.cpp
in src/prod/src/Hosting2
4789 229
StateManager.cpp
in src/prod/src/data/txnreplicator/statemanager
4677 103
PAL.h
in src/prod/src/inc/clr
4600 32
ImageBuilderProxy.cpp
in src/prod/src/Management/ClusterManager
4523 152
ContainerActivator.cpp
in src/prod/src/Hosting2
4503 196
Leases.c
in src/prod/src/Lease/sys
4486 5
FailoverUnit.cpp
in src/prod/src/Reliability/Failover/ra
4330 197
Store.h
in src/prod/src/data/tstore
4295 136
khttpclient.cpp
in src/prod/ktl/src/src
4283 3
engextcpp.cpp
in src/prod/ktl/src/dbgext
4113 1
VersionedServicePackage.cpp
in src/prod/src/Hosting2
4083 186
pal.h
in src/prod/src/pal/src/internal
3943 18
DownloadManager.cpp
in src/prod/src/Hosting2
3833 166
utilcode.h
in src/prod/src/inc/clr
3832 177
Leases.cpp
in src/prod/src/Lease/linux
3784 6
NativeImageStore.cpp
in src/prod/src/Management/ImageStore
3760 163
DynamicStateManager.cs
in src/prod/src/managed/Microsoft.ServiceFabric.Data.Impl/Replicator
3727 112
ApplicationsHandler.cpp
in src/prod/src/httpgateway
3656 100
SortedDictionaryStateProvider.cs
in src/prod/src/managed/Api/src/System/Fabric/btree/stateproviders
3640 129
MBInfoAccess.cpp
in src/prod/src/ktllogger/sys/ktlshim
3545 16
LeasLayr.cpp
in src/prod/src/Lease/linux
3543 10
knetwork.cpp
in src/prod/ktl/src/src
3468 5
LeaseAgent.c
in src/prod/src/Lease/sys
3436 11
KtlLogMarshalKernel.cpp
in src/prod/src/ktllogger/sys/ktlshim
3432 2
Microsoft.ServiceFabric.Powershell.Format.ps1xml
in src/prod/src/managed/powershell/servicefabric
3426 -
RoutingTable.cpp
in src/prod/src/Federation
3368 120
Files With Most Units (Top 20)
File# lines# units
ComFabricClient.cpp
in src/prod/src/api/wrappers
17301 1308
ManagedEventSources.cs
in src/prod/src/managed/Api/src/System/Fabric/Common/Tracing
7881 720
FabricClientImpl.cpp
in src/prod/src/client
10267 506
Test.StateMachine.cpp
in src/prod/src/Reliability/Failover/ra
5982 233
FabricActivatorClient.cpp
in src/prod/src/Hosting2
4789 229
ReplicatedStore.cpp
in src/prod/src/Store
4992 206
GlobalObj.h
in src/prod/src/ktllogger/sys/ktlshim
4926 201
FailoverUnit.cpp
in src/prod/src/Reliability/Failover/ra
4330 197
ContainerActivator.cpp
in src/prod/src/Hosting2
4503 196
FabricException.cs
in src/prod/src/managed/Api/src/System/Fabric
965 193
VersionedServicePackage.cpp
in src/prod/src/Hosting2
4083 186
ProcessActivationManager.cpp
in src/prod/src/Hosting2
5792 180
utilcode.h
in src/prod/src/inc/clr
3832 177
ClusterConnection.cs
in src/prod/src/managed/powershell
1928 176
TestUtility.cs
in src/prod/src/managed/powershell
2279 175
ClusterManagerReplica.cpp
in src/prod/src/Management/ClusterManager
8123 174
DownloadManager.cpp
in src/prod/src/Hosting2
3833 166
NativeImageStore.cpp
in src/prod/src/Management/ImageStore
3760 163
MockClusterConnection.cs
in src/prod/src/managed/powershell
2949 160
ksspi.cpp
in src/prod/ktl/src/src
1908 154
Files With Long Lines (Top 20)

There are 6806 files with lines longer than 120 characters. In total, there are 63351 long lines.

File# lines# units# long lines
FabricClient.h
in src/prod/src/prebuilt/sdk
20395 - 824
sal.h
in src/prod/src/inc/clr/pal/rt
1506 - 685
sal.h
in src/prod/src/inc/palrt
1506 - 685
sal.h
in src/prod/src/pal/src/internal/rt
1510 - 685
clrconfigvalues.h
in src/prod/src/inc/clr
836 - 534
PowershellFabricClient.cs
in src/prod/src/managed/Api/src/System/Fabric/Testability/Client
3237 69 488
TStore.cs
in src/prod/src/managed/Microsoft.ServiceFabric.Data.Impl/ReplicatedStore/DifferentialStore
4872 104 422
RestFabricClient.cs
in src/prod/src/managed/Api/src/System/Fabric/Testability/Client
2577 66 414
ServiceGroup.ServiceGroupReplicationEventSource.h
in src/prod/src/ServiceGroup/Service
436 - 400
Test.StateMachine.cpp
in src/prod/src/Reliability/Failover/ra
5982 233 396
FabricClientHelper.cs
in src/prod/src/managed/Api/src/System/Fabric/Testability/Client
1138 110 359
ComFabricClient.cpp
in src/prod/src/api/wrappers
17301 1308 312
ServiceGroup.ServiceGroupStatefulEventSource.h
in src/prod/src/ServiceGroup/Service
369 - 295
Store.h
in src/prod/src/data/tstore
4295 136 280
SortedDictionaryStateProvider.cs
in src/prod/src/managed/Api/src/System/Fabric/btree/stateproviders
3640 129 274
StateMachine.h
in src/prod/src/Common
335 15 265
SystemFabricClient.cs
in src/prod/src/managed/Api/src/System/Fabric/Testability/Client
2378 83 262
Stream.cs
in src/prod/src/managed/Microsoft.ServiceFabric.Data.Impl/ReliableMessaging/stream
2710 59 262
ReplicatorEventSource.h
in src/prod/src/Reliability/Replication
353 - 255
ManagedEventSources.cs
in src/prod/src/managed/Api/src/System/Fabric/Common/Tracing
7881 720 253