firebase / leveldb
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 104 files with 14,273 lines of code.
    • 2 very long files (2,390 lines of code)
    • 4 long files (2,417 lines of code)
    • 13 medium size files (3,946 lines of codeclsfd_ftr_w_mp_ins)
    • 20 small files (2,904 lines of code)
    • 65 very small files (2,616 lines of code)
16% | 16% | 27% | 20% | 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
cc23% | 18% | 32% | 16% | 9%
html0% | 46% | 36% | 16% | 0%
h0% | 0% | 8% | 37% | 54%
css0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
db35% | 12% | 23% | 20% | 8%
doc/bench0% | 56% | 43% | 0% | 0%
doc0% | 43% | 34% | 15% | 6%
util0% | 21% | 24% | 12% | 41%
table0% | 0% | 43% | 27% | 28%
helpers/memenv0% | 0% | 97% | 0% | 2%
include/leveldb0% | 0% | 0% | 44% | 55%
port0% | 0% | 0% | 68% | 31%
port/win0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
db_impl.cc
in db
1225 39
version_set.cc
in db
1165 52
db_bench.cc
in db
820 40
db_bench_sqlite3.cc
in doc/bench
565 18
index.html
in doc
530 -
env_posix.cc
in util
502 42
c.cc
in db
500 61
db_bench_tree_db.cc
in doc/bench
430 15
benchmark.html
in doc
420 -
repair.cc
in db
369 10
crc32c.cc
in util
310 2
memenv.cc
in helpers/memenv
294 32
db_iter.cc
in db
256 17
cache.cc
in util
252 15
skiplist.h
in db
235 16
table.cc
in table
233 8
version_edit.cc
in db
233 6
table_builder.cc
in table
207 10
block.cc
in table
207 16
log_reader.cc
in db
199 6
dumpfile.cc
in db
193 11
version_set.h
in db
189 13
impl.html
in doc
186 -
c.h
in include/leveldb
181 -
coding.cc
in util
169 11
atomic_pointer.h
in port
165 18
env.h
in include/leveldb
160 19
merger.cc
in table
153 12
two_level_iterator.cc
in table
146 14
dbformat.h
in db
134 16
db_impl.h
in db
130 1
histogram.cc
in util
120 8
format.cc
in table
118 5
port_posix.h
in port
118 5
filename.cc
in db
112 12
write_batch.cc
in db
110 13
dbformat.cc
in db
110 9
table_cache.cc
in db
106 5
memtable.cc
in db
105 15
testharness.h
in util
93 1
filter_block.cc
in table
83 5
version_edit.h
in db
81 8
env.cc
in util
78 5
doc.css
in doc
78 -
posix_logger.h
in util
75 2
log_writer.cc
in db
75 2
builder.cc
in db
68 1
status.cc
in util
66 1
bloom.cc
in util
65 4
testharness.cc
in util
64 4
Files With Most Units (Top 20)
File# lines# units
c.cc
in db
500 61
version_set.cc
in db
1165 52
env_posix.cc
in util
502 42
db_bench.cc
in db
820 40
db_impl.cc
in db
1225 39
memenv.cc
in helpers/memenv
294 32
env.h
in include/leveldb
160 19
atomic_pointer.h
in port
165 18
db_bench_sqlite3.cc
in doc/bench
565 18
db_iter.cc
in db
256 17
block.cc
in table
207 16
skiplist.h
in db
235 16
dbformat.h
in db
134 16
cache.cc
in util
252 15
memtable.cc
in db
105 15
db_bench_tree_db.cc
in doc/bench
430 15
two_level_iterator.cc
in table
146 14
write_batch.cc
in db
110 13
version_set.h
in db
189 13
status.h
in include/leveldb
59 12
Files With Long Lines (Top 1)

There is only one file with lines longer than 120 characters. In total, there are 17 long lines.

File# lines# units# long lines
benchmark.html
in doc
420 - 17