microsoft / MSMARCO-Passage-Ranking
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 14 units with 168 lines of code in units (45.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (47 lines of code)
    • 5 small units (76 lines of code)
    • 7 very small units (45 lines of code)
0% | 0% | 27% | 45% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 27% | 45% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 27% | 45% | 26%
Alternative Visuals
Longest Units
Top 14 longest units
Unit# linesMcCabe index# params
def main()
in get_all_passages.py
25 11 3
def compute_metrics()
in ms_marco_eval.py
22 6 2
def getVectors()
in generateBERTPassageEmbedding.py
20 4 2
17 3 1
14 3 1
def sub()
in subsample.py
13 4 3
def quality_checks_qids()
in ms_marco_eval.py
12 7 2
def loadPassages()
in generateBERTPassageEmbedding.py
8 2 1
def process()
in generateBERTPassageEmbedding.py
8 3 2
def main()
in ms_marco_eval.py
8 2 0
7 3 3
def remove_empty()
in getstats.py
6 3 1
def load_reference()
in ms_marco_eval.py
4 1 1
def load_candidate()
in ms_marco_eval.py
4 1 1