facebookresearch / CompilerGym
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 212 files with 19,687 lines of code.
    • 0 very long files (0 lines of code)
    • 3 long files (1,875 lines of code)
    • 21 medium size files (6,238 lines of codeclsfd_ftr_w_mp_ins)
    • 43 small files (6,137 lines of code)
    • 145 very small files (5,437 lines of code)
0% | 9% | 31% | 31% | 27%
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
py0% | 13% | 27% | 29% | 29%
js0% | 13% | 40% | 29% | 16%
cc0% | 0% | 56% | 24% | 18%
proto0% | 0% | 100% | 0% | 0%
cmake0% | 0% | 16% | 57% | 26%
h0% | 0% | 24% | 11% | 63%
scss0% | 0% | 0% | 54% | 45%
html0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
compiler_gym/envs0% | 19% | 41% | 21% | 17%
www/frontends0% | 11% | 34% | 33% | 21%
compiler_gym/service0% | 0% | 52% | 15% | 31%
build_tools/cmake0% | 0% | 16% | 57% | 26%
compiler_gym0% | 0% | 46% | 19% | 33%
compiler_gym/util0% | 0% | 14% | 30% | 55%
compiler_gym/datasets0% | 0% | 0% | 78% | 21%
compiler_gym/views0% | 0% | 0% | 64% | 35%
www0% | 0% | 0% | 100% | 0%
compiler_gym/leaderboard0% | 0% | 0% | 99% | <1%
ROOT0% | 0% | 0% | 100% | 0%
compiler_gym/wrappers0% | 0% | 0% | 0% | 100%
compiler_gym/spaces0% | 0% | 0% | 0% | 100%
leaderboard/llvm_instcount0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
compiler_env.py
in compiler_gym/envs
716 37
cbench.py
in compiler_gym/envs/llvm/datasets
655 14
ActionsDict.js
in www/frontends/compiler_gym/src/utils
504 -
connection.py
in compiler_gym/service
450 23
gcc_service.py
in compiler_gym/envs/gcc/service
445 10
gcc.py
in compiler_gym/envs/gcc
432 52
ActionsNavbar.js
in www/frontends/compiler_gym/src/components/Navbars
366 1
InstCountDict.js
in www/frontends/compiler_gym/src/utils
353 -
llvm_env.py
in compiler_gym/envs/llvm
353 16
proto
compiler_gym_service.proto
in compiler_gym/service/proto
351 -
ControlsContainer.js
in www/frontends/compiler_gym/src/components/Sections
327 -
cmake
cg_macros.cmake
in build_tools/cmake
320 -
random_search.py
in compiler_gym
289 10
AutophaseDict.js
in www/frontends/compiler_gym/src/utils
283 -
__init__.py
in compiler_gym/envs/llvm/datasets
277 9
cc
Benchmark.cc
in compiler_gym/envs/llvm/service
256 17
cc
LlvmSession.cc
in compiler_gym/envs/llvm/service
251 15
loop_tool_compilation_session.py
in compiler_gym/envs/loop_tool/service
233 6
CompilerGymServiceImpl.h
in compiler_gym/service/runtime
224 14
cc
Cost.cc
in compiler_gym/envs/llvm/service
213 6
executor.py
in compiler_gym/util
205 25
config.py
in compiler_gym/envs/llvm/service/passes
205 1
cc
Observation.cc
in compiler_gym/envs/llvm/service
204 1
InstcountsStateContainer.js
in www/frontends/compiler_gym/src/components/StateVisualizations
201 -
AutophaseStateContainer.js
in www/frontends/compiler_gym/src/components/StateVisualizations
199 -
llvm_benchmark.py
in compiler_gym/envs/llvm
198 7
extract_passes_from_llvm_source_tree.py
in compiler_gym/envs/llvm/service/passes
197 5
compiler_gym_service.py
in compiler_gym/service/runtime
196 11
minimize_trajectory.py
in compiler_gym/util
194 8
observation_space_spec.py
in compiler_gym/views
193 8
dataset.py
in compiler_gym/datasets
192 35
cmake
cg_python.cmake
in build_tools/cmake
186 -
cmake
cg_cc_library.cmake
in build_tools/cmake
177 -
www.py
in www
176 8
cc
ObservationSpaces.cc
in compiler_gym/envs/llvm/service
173 1
ActionsHeatMap.js
in www/frontends/compiler_gym/src/components/Sections
169 4
cmake
FindProGraML.cmake
in build_tools/cmake
159 -
llvm_instcount.py
in compiler_gym/leaderboard
156 3
poj104.py
in compiler_gym/envs/llvm/datasets
156 6
SparkLineTable.js
in www/frontends/compiler_gym/src/components/StateVisualizations
152 1
setup.py
in root
151 5
csmith.py
in compiler_gym/envs/gcc/datasets
147 13
RewardHistoryChart.js
in www/frontends/compiler_gym/src/components/Sections
144 1
csmith.py
in compiler_gym/envs/llvm/datasets
144 10
highlightjs.scss
in www/frontends/compiler_gym/src/assets/scss
139 -
cmake
cg_cc_binary.cmake
in build_tools/cmake
134 -
SearchTree.js
in www/frontends/compiler_gym/src/components/Sections
133 -
cmake
protobuf.cmake
in build_tools/cmake
132 -
variables.scss
in www/frontends/compiler_gym/src/assets/scss
125 -
cmake
FindLabm8.cmake
in build_tools/cmake
125 -
Files With Most Units (Top 20)
File# lines# units
gcc.py
in compiler_gym/envs/gcc
432 52
compiler_env.py
in compiler_gym/envs
716 37
dataset.py
in compiler_gym/datasets
192 35
executor.py
in compiler_gym/util
205 25
benchmark.py
in compiler_gym/datasets
120 23
connection.py
in compiler_gym/service
450 23
core.py
in compiler_gym/wrappers
73 19
datasets.py
in compiler_gym/datasets
116 18
gcc_env.py
in compiler_gym/envs/gcc
104 18
cc
Benchmark.cc
in compiler_gym/envs/llvm/service
256 17
llvm_env.py
in compiler_gym/envs/llvm
353 16
compiler_env_state.py
in compiler_gym
118 15
cc
LlvmSession.cc
in compiler_gym/envs/llvm/service
251 15
CompilerGymServiceImpl.h
in compiler_gym/service/runtime
224 14
cbench.py
in compiler_gym/envs/llvm/datasets
655 14
Benchmark.h
in compiler_gym/envs/llvm/service
110 14
csmith.py
in compiler_gym/envs/gcc/datasets
147 13
compiler_gym_service.py
in compiler_gym/service/runtime
196 11
reward.py
in compiler_gym/spaces
91 10
random_search.py
in compiler_gym
289 10
Files With Long Lines (Top 14)

There are 14 files with lines longer than 120 characters. In total, there are 18 long lines.

File# lines# units# long lines
uri.py
in compiler_gym/datasets
57 8 2
__init__.py
in compiler_gym/envs/llvm/datasets
277 9 2
clgen.py
in compiler_gym/envs/llvm/datasets
125 3 2
extract_passes_from_llvm_source_tree.py
in compiler_gym/envs/llvm/service/passes
197 5 2
index.html
in www/frontends/compiler_gym/public
21 - 1
Helpers.js
in www/frontends/compiler_gym/src/utils
103 2 1
RewardsSection.js
in www/frontends/compiler_gym/src/components/Sections
61 - 1
ControlsContainer.js
in www/frontends/compiler_gym/src/components/Sections
327 - 1
ApiService.js
in www/frontends/compiler_gym/src/api
54 6 1
cmake
cg_add_all_subdirs.cmake
in build_tools/cmake
29 - 1
cmake
set_command_pythonpath.cmake
in build_tools/cmake
19 - 1
cmake
FindProGraML.cmake
in build_tools/cmake
159 - 1
loop_tool_compilation_session.py
in compiler_gym/envs/loop_tool/service
233 6 1
poj104.py
in compiler_gym/envs/llvm/datasets
156 6 1