facebookincubator / FCR
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 27 files with 7,225 lines of code.
    • 2 very long files (4,262 lines of code)
    • 2 long files (1,301 lines of code)
    • 1 medium size files (294 lines of codeclsfd_ftr_w_mp_ins)
    • 6 small files (867 lines of code)
    • 16 very small files (501 lines of code)
58% | 18% | 4% | 12% | 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
py60% | 18% | 4% | 9% | 7%
thrift0% | 0% | 0% | 100% | 0%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner99% | 0% | 0% | 0% | <1%
fbnet/command_runner0% | 47% | 10% | 25% | 16%
if0% | 0% | 0% | 100% | 0%
if/py0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
if/py/gen-py/fbnet/command_runner_asyncio0% | 0% | 0% | 0% | 100%
if/py/gen-py/fbnet0% | 0% | 0% | 0% | 100%
if/py/gen-py0% | 0% | 0% | 0% | 100%
Longest Files (Top 27)
File# lines# units
Command.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
3168 232
ttypes.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
1094 86
command_session.py
in fbnet/command_runner
734 57
command_handler.py
in fbnet/command_runner
567 15
console_session.py
in fbnet/command_runner
294 10
device_vendor.py
in fbnet/command_runner
173 30
utils.py
in fbnet/command_runner
171 11
171 -
service.py
in fbnet/command_runner
130 16
base_service.py
in fbnet/command_runner
112 16
ssh_netconf.py
in fbnet/command_runner
110 6
device_info.py
in fbnet/command_runner
96 16
exceptions.py
in fbnet/command_runner
91 2
device_db.py
in fbnet/command_runner
66 3
thrift_client.py
in fbnet/command_runner
64 6
counters.py
in fbnet/command_runner
49 12
command_server.py
in fbnet/command_runner
48 6
options.py
in fbnet/command_runner
21 5
global_namespace.py
in fbnet/command_runner
19 4
setup.py
in if/py
16 -
setup.py
in root
16 -
constants.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
10 -
__init__.py
in fbnet/command_runner
1 -
__init__.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
1 -
__init__.py
in if/py/gen-py/fbnet/command_runner_asyncio
1 -
__init__.py
in if/py/gen-py/fbnet
1 -
__init__.py
in if/py/gen-py
1 -
Files With Most Units (Top 18)
File# lines# units
Command.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
3168 232
ttypes.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
1094 86
command_session.py
in fbnet/command_runner
734 57
device_vendor.py
in fbnet/command_runner
173 30
device_info.py
in fbnet/command_runner
96 16
service.py
in fbnet/command_runner
130 16
base_service.py
in fbnet/command_runner
112 16
command_handler.py
in fbnet/command_runner
567 15
counters.py
in fbnet/command_runner
49 12
utils.py
in fbnet/command_runner
171 11
console_session.py
in fbnet/command_runner
294 10
command_server.py
in fbnet/command_runner
48 6
thrift_client.py
in fbnet/command_runner
64 6
ssh_netconf.py
in fbnet/command_runner
110 6
options.py
in fbnet/command_runner
21 5
global_namespace.py
in fbnet/command_runner
19 4
device_db.py
in fbnet/command_runner
66 3
exceptions.py
in fbnet/command_runner
91 2
Files With Long Lines (Top 2)

There are 2 files with lines longer than 120 characters. In total, there are 314 long lines.

File# lines# units# long lines
Command.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
3168 232 227
ttypes.py
in if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner
1094 86 87
Correlations

File Size vs. Commits (all time): 22 points

fbnet/command_runner/command_session.py x: 62 commits (all time) y: 734 lines of code fbnet/command_runner/device_info.py x: 24 commits (all time) y: 96 lines of code fbnet/command_runner/service.py x: 16 commits (all time) y: 130 lines of code fbnet/command_runner/utils.py x: 8 commits (all time) y: 171 lines of code fbnet/command_runner/device_vendor.py x: 20 commits (all time) y: 173 lines of code if/CommandRunner.thrift x: 27 commits (all time) y: 171 lines of code fbnet/command_runner/command_handler.py x: 45 commits (all time) y: 567 lines of code fbnet/command_runner/console_session.py x: 45 commits (all time) y: 294 lines of code fbnet/command_runner/device_db.py x: 11 commits (all time) y: 66 lines of code fbnet/command_runner/global_namespace.py x: 3 commits (all time) y: 19 lines of code fbnet/command_runner/exceptions.py x: 10 commits (all time) y: 91 lines of code fbnet/command_runner/options.py x: 5 commits (all time) y: 21 lines of code fbnet/command_runner/base_service.py x: 6 commits (all time) y: 112 lines of code fbnet/command_runner/ssh_netconf.py x: 17 commits (all time) y: 110 lines of code fbnet/command_runner/thrift_client.py x: 6 commits (all time) y: 64 lines of code if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner/Command.py x: 7 commits (all time) y: 3168 lines of code fbnet/command_runner/counters.py x: 6 commits (all time) y: 49 lines of code fbnet/command_runner/__init__.py x: 3 commits (all time) y: 1 lines of code fbnet/command_runner/command_server.py x: 7 commits (all time) y: 48 lines of code if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner/ttypes.py x: 4 commits (all time) y: 1094 lines of code
3168.0
lines of code
  min: 1.0
  average: 327.77
  25th percentile: 41.25
  median: 103.0
  75th percentile: 203.25
  max: 3168.0
0 62.0
commits (all time)
min: 3.0 | average: 15.45 | 25th percentile: 5.0 | median: 7.5 | 75th percentile: 21.0 | max: 62.0

File Size vs. Contributors (all time): 22 points

fbnet/command_runner/command_session.py x: 12 contributors (all time) y: 734 lines of code fbnet/command_runner/device_info.py x: 8 contributors (all time) y: 96 lines of code fbnet/command_runner/service.py x: 5 contributors (all time) y: 130 lines of code fbnet/command_runner/utils.py x: 5 contributors (all time) y: 171 lines of code fbnet/command_runner/device_vendor.py x: 6 contributors (all time) y: 173 lines of code if/CommandRunner.thrift x: 9 contributors (all time) y: 171 lines of code fbnet/command_runner/command_handler.py x: 12 contributors (all time) y: 567 lines of code fbnet/command_runner/console_session.py x: 13 contributors (all time) y: 294 lines of code fbnet/command_runner/device_db.py x: 5 contributors (all time) y: 66 lines of code fbnet/command_runner/global_namespace.py x: 2 contributors (all time) y: 19 lines of code fbnet/command_runner/exceptions.py x: 1 contributors (all time) y: 91 lines of code fbnet/command_runner/options.py x: 4 contributors (all time) y: 21 lines of code fbnet/command_runner/base_service.py x: 4 contributors (all time) y: 112 lines of code fbnet/command_runner/ssh_netconf.py x: 7 contributors (all time) y: 110 lines of code fbnet/command_runner/thrift_client.py x: 4 contributors (all time) y: 64 lines of code if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner/Command.py x: 4 contributors (all time) y: 3168 lines of code fbnet/command_runner/counters.py x: 4 contributors (all time) y: 49 lines of code fbnet/command_runner/__init__.py x: 2 contributors (all time) y: 1 lines of code if/py/setup.py x: 3 contributors (all time) y: 16 lines of code if/py/gen-py/fbnet/command_runner_asyncio/CommandRunner/ttypes.py x: 2 contributors (all time) y: 1094 lines of code
3168.0
lines of code
  min: 1.0
  average: 327.77
  25th percentile: 41.25
  median: 103.0
  75th percentile: 203.25
  max: 3168.0
0 13.0
contributors (all time)
min: 1.0 | average: 5.41 | 25th percentile: 3.0 | median: 4.0 | 75th percentile: 7.25 | max: 13.0

File Size vs. Commits (30 days): 0 points

No data for "commits (30d)" vs. "lines of code".

File Size vs. Contributors (30 days): 0 points

No data for "contributors (30d)" vs. "lines of code".


File Size vs. Commits (90 days): 7 points

fbnet/command_runner/command_session.py x: 5 commits (90d) y: 734 lines of code fbnet/command_runner/device_info.py x: 4 commits (90d) y: 96 lines of code fbnet/command_runner/service.py x: 1 commits (90d) y: 130 lines of code fbnet/command_runner/utils.py x: 1 commits (90d) y: 171 lines of code fbnet/command_runner/device_vendor.py x: 2 commits (90d) y: 173 lines of code if/CommandRunner.thrift x: 3 commits (90d) y: 171 lines of code fbnet/command_runner/command_handler.py x: 1 commits (90d) y: 567 lines of code
734.0
lines of code
  min: 96.0
  average: 291.71
  25th percentile: 130.0
  median: 171.0
  75th percentile: 567.0
  max: 734.0
0 5.0
commits (90d)
min: 1.0 | average: 2.43 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 4.0 | max: 5.0

File Size vs. Contributors (90 days): 7 points

fbnet/command_runner/command_session.py x: 2 contributors (90d) y: 734 lines of code fbnet/command_runner/device_info.py x: 1 contributors (90d) y: 96 lines of code fbnet/command_runner/service.py x: 1 contributors (90d) y: 130 lines of code fbnet/command_runner/utils.py x: 1 contributors (90d) y: 171 lines of code if/CommandRunner.thrift x: 2 contributors (90d) y: 171 lines of code fbnet/command_runner/command_handler.py x: 1 contributors (90d) y: 567 lines of code
734.0
lines of code
  min: 96.0
  average: 291.71
  25th percentile: 130.0
  median: 171.0
  75th percentile: 567.0
  max: 734.0
0 2.0
contributors (90d)
min: 1.0 | average: 1.29 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 2.0