apple / swift-nio
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 191 files with 33,995 lines of code.
    • 4 very long files (6,201 lines of code)
    • 9 long files (6,106 lines of code)
    • 35 medium size files (11,262 lines of codeclsfd_ftr_w_mp_ins)
    • 38 small files (5,397 lines of code)
    • 105 very small files (5,029 lines of code)
18% | 17% | 33% | 15% | 14%
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
swift14% | 20% | 35% | 17% | 13%
c77% | 0% | 8% | 4% | 9%
h0% | 0% | 45% | 0% | 54%
rb0% | 0% | 0% | 100% | 0%
yaml0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
d0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
Sources/NIOCore29% | 12% | 29% | 15% | 12%
Sources/CNIOHTTPParser86% | 0% | 12% | 0% | <1%
Sources/NIOHTTP133% | 20% | 35% | 8% | 2%
Sources/NIOPosix0% | 29% | 48% | 15% | 6%
Sources/NIOPerformanceTester0% | 70% | 0% | 5% | 24%
Sources/NIOHTTP1Server0% | 0% | 100% | 0% | 0%
Sources/NIOEmbedded0% | 0% | 100% | 0% | 0%
Sources/NIOConcurrencyHelpers0% | 0% | 44% | 55% | 0%
Sources/NIOWebSocketServer0% | 0% | 100% | 0% | 0%
Sources/NIOWebSocket0% | 0% | 20% | 38% | 41%
Sources/_NIODataStructures0% | 0% | 74% | 0% | 25%
Sources/CNIOSHA10% | 0% | 87% | 0% | 12%
Sources/NIOTLS0% | 0% | 0% | 73% | 26%
Sources/NIOCrashTester0% | 0% | 0% | 45% | 54%
Sources/NIOWebSocketClient0% | 0% | 0% | 100% | 0%
scripts0% | 0% | 0% | 100% | 0%
Sources/NIOFoundationCompat0% | 0% | 0% | 65% | 34%
Sources/NIOChatServer0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 100% | 0%
Sources/CNIOLinux0% | 0% | 0% | 57% | 42%
docker0% | 0% | 0% | 0% | 100%
Sources/CNIOAtomics0% | 0% | 0% | 0% | 100%
Sources/NIOAsyncAwaitDemo0% | 0% | 0% | 0% | 100%
dev0% | 0% | 0% | 0% | 100%
Sources/CNIOWindows0% | 0% | 0% | 0% | 100%
Sources/NIOUDPEchoClient0% | 0% | 0% | 0% | 100%
Sources/CNIODarwin0% | 0% | 0% | 0% | 100%
Sources/NIOHTTP1Client0% | 0% | 0% | 0% | 100%
Sources/NIOMulticastChat0% | 0% | 0% | 0% | 100%
Sources/NIOChatClient0% | 0% | 0% | 0% | 100%
Sources/NIOEchoClient0% | 0% | 0% | 0% | 100%
Sources/NIOEchoServer0% | 0% | 0% | 0% | 100%
Sources/NIOUDPEchoServer0% | 0% | 0% | 0% | 100%
Sources/NIO0% | 0% | 0% | 0% | 100%
Sources/_NIOConcurrency0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
ByteBuffer-multi-int.swift
in Sources/NIOCore
1934 -
c_nio_http_parser.c
in Sources/CNIOHTTPParser
1929 1
HTTPTypes.swift
in Sources/NIOHTTP1
1170 7
ChannelPipeline.swift
in Sources/NIOCore
1168 22
BaseSocketChannel.swift
in Sources/NIOPosix
917 20
EventLoopFuture.swift
in Sources/NIOCore
759 3
HTTPDecoder.swift
in Sources/NIOHTTP1
717 21
SocketChannel.swift
in Sources/NIOPosix
715 15
main.swift
in Sources/NIOPerformanceTester
705 14
Bootstrap.swift
in Sources/NIOPosix
639 15
ByteBuffer-core.swift
in Sources/NIOCore
574 11
System.swift
in Sources/NIOPosix
542 3
resources.swift
in Sources/NIOPerformanceTester
538 -
main.swift
in Sources/NIOHTTP1Server
494 19
HTTPEncoder.swift
in Sources/NIOHTTP1
493 3
SelectableEventLoop.swift
in Sources/NIOPosix
489 2
Codec.swift
in Sources/NIOCore
480 14
CircularBuffer.swift
in Sources/NIOCore
471 -
SocketAddresses.swift
in Sources/NIOCore
450 11
EventLoop.swift
in Sources/NIOCore
446 15
BSDSocketAPIWindows.swift
in Sources/NIOPosix
431 -
Embedded.swift
in Sources/NIOEmbedded
418 16
LinuxUring.swift
in Sources/NIOPosix
390 9
Interfaces.swift
in Sources/NIOCore
366 1
PendingDatagramWritesManager.swift
in Sources/NIOPosix
357 7
HappyEyeballs.swift
in Sources/NIOPosix
340 4
ByteBuffer-aux.swift
in Sources/NIOCore
334 1
PendingWritesManager.swift
in Sources/NIOPosix
317 5
atomics.swift
in Sources/NIOConcurrencyHelpers
310 -
HTTPServerPipelineHandler.swift
in Sources/NIOHTTP1
288 3
c_nio_http_parser.h
in Sources/CNIOHTTPParser/include
285 -
SelectorGeneric.swift
in Sources/NIOPosix
277 21
BaseSocket.swift
in Sources/NIOPosix
272 19
NIOHTTPObjectAggregator.swift
in Sources/NIOHTTP1
270 5
BSDSocketAPI.swift
in Sources/NIOCore
263 -
NonBlockingFileIO.swift
in Sources/NIOPosix
261 1
SelectorKqueue.swift
in Sources/NIOPosix
257 16
MultiThreadedEventLoopGroup.swift
in Sources/NIOPosix
256 4
SelectorUring.swift
in Sources/NIOPosix
254 9
ControlMessage.swift
in Sources/NIOPosix
247 10
ChannelHandlers.swift
in Sources/NIOCore
246 -
main.swift
in Sources/NIOWebSocketServer
226 3
NIOHTTPClientUpgradeHandler.swift
in Sources/NIOHTTP1
221 3
WebSocketFrame.swift
in Sources/NIOWebSocket
217 2
BSDSocketAPIPosix.swift
in Sources/NIOPosix
213 -
Heap.swift
in Sources/_NIODataStructures
212 9
c_nio_sha1.c
in Sources/CNIOSHA1
206 -
SelectorEpoll.swift
in Sources/NIOPosix
205 10
NIOAtomic.swift
in Sources/NIOConcurrencyHelpers
200 -
ChannelOption.swift
in Sources/NIOCore
199 2
Files With Most Units (Top 20)
File# lines# units
ChannelPipeline.swift
in Sources/NIOCore
1168 22
PipePair.swift
in Sources/NIOPosix
130 22
HTTPDecoder.swift
in Sources/NIOHTTP1
717 21
SelectorGeneric.swift
in Sources/NIOPosix
277 21
ChannelHandler.swift
in Sources/NIOCore
95 20
BaseSocketChannel.swift
in Sources/NIOPosix
917 20
SocketProtocols.swift
in Sources/NIOPosix
69 20
main.swift
in Sources/NIOHTTP1Server
494 19
BaseSocket.swift
in Sources/NIOPosix
272 19
ChannelInvoker.swift
in Sources/NIOCore
69 18
Channel.swift
in Sources/NIOCore
132 17
Embedded.swift
in Sources/NIOEmbedded
418 16
SelectorKqueue.swift
in Sources/NIOPosix
257 16
DeadChannel.swift
in Sources/NIOCore
69 15
EventLoop.swift
in Sources/NIOCore
446 15
Bootstrap.swift
in Sources/NIOPosix
639 15
SocketChannel.swift
in Sources/NIOPosix
715 15
shim.c
in Sources/CNIOLinux
101 14
Codec.swift
in Sources/NIOCore
480 14
main.swift
in Sources/NIOPerformanceTester
705 14
Files With Long Lines (Top 20)

There are 86 files with lines longer than 120 characters. In total, there are 525 long lines.

File# lines# units# long lines
ByteBuffer-multi-int.swift
in Sources/NIOCore
1934 - 49
ByteBuffer-core.swift
in Sources/NIOCore
574 11 24
CNIOAtomics.h
in Sources/CNIOAtomics/include
52 - 23
System.swift
in Sources/NIOPosix
542 3 21
resources.swift
in Sources/NIOPerformanceTester
538 - 20
LinuxUring.swift
in Sources/NIOPosix
390 9 20
main.swift
in Sources/NIOHTTP1Server
494 19 19
SocketChannel.swift
in Sources/NIOPosix
715 15 19
main.swift
in Sources/NIOPerformanceTester
705 14 18
PendingDatagramWritesManager.swift
in Sources/NIOPosix
357 7 16
SelectorKqueue.swift
in Sources/NIOPosix
257 16 16
EventLoopFuture.swift
in Sources/NIOCore
759 3 15
HTTPServerUpgradeHandler.swift
in Sources/NIOHTTP1
191 2 15
PendingWritesManager.swift
in Sources/NIOPosix
317 5 15
SelectorUring.swift
in Sources/NIOPosix
254 9 13
HTTPEncoder.swift
in Sources/NIOHTTP1
493 3 11
Bootstrap.swift
in Sources/NIOPosix
639 15 10
ChannelHandlers.swift
in Sources/NIOCore
246 - 9
NIOAtomic.swift
in Sources/NIOConcurrencyHelpers
200 - 8
ChannelPipeline.swift
in Sources/NIOCore
1168 22 7