microsoft / Windows-driver-samples
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 3,624 files with 1,011,243 lines of code.
    • 190 very long files (416,321 lines of code)
    • 278 long files (194,510 lines of code)
    • 795 medium size files (244,187 lines of codeclsfd_ftr_w_mp_ins)
    • 588 small files (88,783 lines of code)
    • 1,773 very small files (67,442 lines of code)
41% | 19% | 24% | 8% | 6%
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
c60% | 20% | 14% | 3% | 1%
cpp33% | 24% | 29% | 7% | 4%
h19% | 14% | 28% | 16% | 20%
vcxproj18% | 8% | 49% | 22% | <1%
hpp94% | 0% | 4% | 0% | <1%
htm71% | 0% | 25% | 3% | 0%
Filters12% | 3% | 16% | 12% | 55%
cs60% | 0% | 21% | 0% | 17%
CPP74% | 0% | 25% | 0% | 0%
cxx0% | 55% | 34% | 5% | 3%
C0% | 97% | 0% | 0% | 2%
xaml0% | 65% | 0% | 13% | 21%
js0% | 0% | 90% | 0% | 9%
man0% | 0% | 93% | 0% | 6%
hxx0% | 0% | 34% | 23% | 41%
cmd0% | 0% | 45% | 33% | 21%
H0% | 0% | 38% | 27% | 34%
VcxProj0% | 0% | 0% | 62% | 37%
filters0% | 0% | 0% | 0% | 100%
props0% | 0% | 0% | 0% | 100%
inc0% | 0% | 0% | 0% | 100%
reg0% | 0% | 0% | 0% | 100%
ctl0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
network56% | 16% | 17% | 6% | 4%
storage82% | 8% | 5% | 2% | 1%
filesys43% | 24% | 20% | 8% | 2%
usb41% | 17% | 21% | 8% | 11%
print23% | 23% | 30% | 11% | 11%
audio30% | 25% | 29% | 9% | 4%
avstream37% | 19% | 25% | 8% | 8%
wia50% | 12% | 26% | 4% | 4%
hid39% | 16% | 19% | 16% | 8%
wpd9% | 29% | 40% | 8% | 11%
sd93% | 0% | 0% | 5% | 1%
serial14% | 37% | 27% | 10% | 9%
spb30% | 19% | 37% | 5% | 6%
wmi57% | 0% | 24% | 12% | 5%
setup44% | 43% | 8% | 0% | 4%
general1% | 13% | 48% | 21% | 14%
bluetooth12% | 39% | 23% | 13% | 10%
pofx10% | 18% | 43% | 16% | 10%
sensors0% | 31% | 52% | 8% | 8%
video0% | 44% | 44% | 2% | 8%
smartcrd0% | 68% | 16% | 6% | 8%
biometrics0% | 33% | 41% | 11% | 13%
nfp0% | 28% | 49% | 9% | 13%
pos0% | 49% | 29% | 0% | 21%
simbatt0% | 52% | 36% | 0% | 11%
thermal0% | 52% | 0% | 36% | 11%
TrEE0% | 33% | 61% | 0% | 5%
input0% | 0% | 70% | 20% | 9%
gnss0% | 0% | 64% | 16% | 19%
security0% | 0% | 53% | 32% | 13%
nfc0% | 0% | 0% | 51% | 48%
ROOT0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
vndrlist.h
in usb/usbview
10989 -
P2P.c
in network/wlan/WDI/COMMON
9479 -
class.c
in storage/class/classpnp/src
8427 14
N6C_Req.c
in network/wlan/WDI/PLATFORM/NDIS6
8401 -
MgntLink.c
in network/wlan/WDI/COMMON
8247 1
HelperFunctions_FwpObjects.cpp
in network/trans/WFPSampler/syslib
6427 72
ioctl.c
in storage/class/cdrom/src
5861 -
common.c
in storage/miniports/storahci/src
5738 1
dsmmain.c
in storage/msdsm/src
5235 1
utils.c
in storage/class/classpnp/src
5111 23
N63C_Oids.c
in network/wlan/WDI/PLATFORM/NDIS6
5095 -
wmisample.c
in storage/iscsi/src/client
5060 15
HelperFunctions_CommandLine.cpp
in network/trans/WFPSampler/exe
4810 32
lsi_u3.c
in storage/miniports/lsi_u3/src
4716 38
utils.c
in storage/msdsm/src
4634 2
usbschema.hpp
in usb/usbview
4540 522
Ndis6Common.c
in network/wlan/WDI/PLATFORM/NDIS6
4502 -
WDI_Cmds.c
in network/wlan/WDI/PLATFORM/NDIS6
4411 -
SecurityGen.c
in network/wlan/WDI/COMMON
4345 -
ClassifyFunctions_BasicPacketExaminationCallouts.cpp
in network/trans/WFPSampler/sys
4258 31
N6Sdio_main.c
in network/wlan/WDI/PLATFORM/NDIS6/SDIO
4224 -
display.c
in usb/usbview
3799 4
ClassifyFunctions_BasicPacketModificationCallouts.cpp
in network/trans/WFPSampler/sys
3658 15
dispvid.c
in usb/usbview
3642 -
ApEngine.c
in network/wlan/WDI/COMMON
3597 -
fsctrl.c
in filesys/fastfat
3571 -
N6C_OidSet.c
in network/wlan/WDI/PLATFORM/NDIS6
3488 -
UsbHsDevice.cpp
in audio/sysvad
3396 1
filter.cpp
in avstream/avscamera/sys
3310 -
MgntActSetParam.c
in network/wlan/WDI/COMMON
3284 -
ecdisp.c
in hid/hclient
3198 3
create.c
in filesys/fastfat
3153 -
Identifiers.h
in network/trans/WFPSampler/inc
3123 -
ClassifyFunctions_AdvancedPacketInjectionCallouts.cpp
in network/trans/WFPSampler/sys
3073 18
ClassifyFunctions_BasicPacketInjectionCallouts.cpp
in network/trans/WFPSampler/sys
3053 18
disk.c
in storage/class/disk/src
3028 -
TypeDef.h
in network/wlan/WDI/HEADER
2984 -
MgntGen.c
in network/wlan/WDI/COMMON
2928 -
common.cpp
in audio/sysvad
2915 1
N6Sdio_WdiMain.c
in network/wlan/WDI/PLATFORM/NDIS6/SDIO
2838 24
hclient.c
in hid/hclient
2764 1
Transmit.c
in network/wlan/WDI/COMMON
2754 -
SensorSimulation.cpp
in avstream/avscamera/sys
2734 -
A2dpHpDevice.cpp
in audio/sysvad
2724 7
intrface.c
in storage/msdsm/src
2705 -
HelperFunctions_Headers.cpp
in network/trans/WFPSampler/syslib
2703 31
MgntConstructPacket.c
in network/wlan/WDI/COMMON
2703 -
cdrom.c
in storage/class/cdrom/src
2678 -
minwavert.cpp
in audio/sysvad/EndpointsCommon
2599 27
N62C_Oids.c
in network/wlan/WDI/PLATFORM/NDIS6
2579 -
Files With Most Units (Top 20)
File# lines# units
usbschema.hpp
in usb/usbview
4540 522
PrinterExtensionAdapters.cs
in print/v4PrintDriverSamples/PrinterExtensionSample/PrinterExtensionLibrary
1533 97
HelperFunctions_FwpObjects.cpp
in network/trans/WFPSampler/syslib
6427 72
v4PrintDriver-Intellisense.js
in print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript
216 50
v4PrintDriver-Intellisense.js
in print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver
216 50
v4PrintDriver-Intellisense.js
in print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension
216 50
wiadriver.cpp
in wia/wiadriverex/usd
2010 50
MFT0Impl.cpp
in avstream/avscamera/mft0
1541 43
multipinmfthelpers.cpp
in avstream/sampledevicemft
1363 42
multipinmft.cpp
in avstream/sampledevicemft
1247 41
basicstr.h
in wia/wiadriverex/usd
892 41
Mft0.cpp
in avstream/samplemft0
790 38
lsi_u3.c
in storage/miniports/lsi_u3/src
4716 38
notify.cpp
in network/ndis/mux/notifyob
900 37
Features.cpp
in print/OEM Printer Customization Plug-in Samples/C++/PSUIRep
1788 37
FakeDevice.h
in wpd/WpdWudfSampleDriver
2007 34
SimpleMediaSourceActivate.cpp
in general/SimpleMediaSource/MediaSource
205 33
intrface.cpp
in print/OEM Printer Customization Plug-in Samples/C++/watermarkuni/wmarkuni
665 33
HelperFunctions_CommandLine.cpp
in network/trans/WFPSampler/exe
4810 32
ClassifyFunctions_BasicPacketExaminationCallouts.cpp
in network/trans/WFPSampler/sys
4258 31
Files With Long Lines (Top 20)

There are 1315 files with lines longer than 120 characters. In total, there are 15042 long lines.

File# lines# units# long lines
RegCommon.h
in network/wlan/WDI/HEADER
378 - 357
HelperFunctions_ExposedCallouts.h
in network/trans/WFPSampler/sys
560 - 340
usbschema.hpp
in usb/usbview
4540 522 265
MgntLink.c
in network/wlan/WDI/COMMON
8247 1 215
InitProp.cpp
in wia/ProdScan
1875 15 196
P2P.c
in network/wlan/WDI/COMMON
9479 - 195
common.c
in storage/miniports/storahci/src
5738 1 184
helpers.cpp
in wpd/WpdWudfSampleDriver
1361 21 177
N6C_Req.c
in network/wlan/WDI/PLATFORM/NDIS6
8401 - 172
class.c
in storage/class/classpnp/src
8427 14 168
WDI_Cmds.c
in network/wlan/WDI/PLATFORM/NDIS6
4411 - 147
usb_host_based_sample.js
in print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver
323 - 146
wmi-acpi.htm
in wmi/wmiacpi
1608 - 134
utils.c
in storage/class/classpnp/src
5111 23 131
USBMon-Bidi-Extension.js
in print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension
290 - 119
Hal8723BFirmware.h
in network/wlan/WDI/HAL/rtl8723B
341 - 114
N6C_OidSet.c
in network/wlan/WDI/PLATFORM/NDIS6
3488 - 110
pnppower.c
in storage/miniports/storahci/src
1805 - 109
Ndis6Common.c
in network/wlan/WDI/PLATFORM/NDIS6
4502 - 104
ClassifyFunctions_FastPacketInjectionCallouts.cpp
in network/trans/WFPSampler/sys
1319 2 102