microsoft / Range-V3-VS2015
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 1,315 units with 7,354 lines of code in units (21.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (115 lines of code)
    • 40 medium size units (1,054 lines of code)
    • 84 small units (1,238 lines of code)
    • 1,189 very small units (4,947 lines of code)
0% | 1% | 14% | 16% | 67%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
hpp0% | 1% | 13% | 16% | 68%
cpp0% | 0% | 28% | 23% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
include/range/v3/algorithm0% | 5% | 41% | 20% | 32%
include/range/v3/view0% | 2% | 6% | 14% | 76%
include/range/v3/utility0% | 0% | 11% | 7% | 81%
example0% | 0% | 43% | 9% | 46%
include/range/v3/action0% | 0% | 11% | 52% | 35%
include/range/v30% | 0% | 3% | 10% | 86%
perf0% | 0% | 10% | 38% | 50%
include/meta0% | 0% | 0% | 0% | 100%
include/range/v3/numeric0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static I impl()
in include/range/v3/algorithm/stable_partition.hpp
59 9 7
static auto bind()
in include/range/v3/view/slice.hpp
56 2 3
void benchmark()
in example/comprehensions.cpp
47 6 0
static I impl()
in include/range/v3/algorithm/stable_partition.hpp
39 7 7
int main()
in example/calendar.cpp
38 8 2
static bool four_iter_impl()
in include/range/v3/algorithm/permutation.hpp
38 18 7
static range rotate_forward()
in include/range/v3/algorithm/rotate.hpp
32 9 3
static I1 sized_impl()
in include/range/v3/algorithm/search.hpp
32 8 9
static I sized_impl()
in include/range/v3/algorithm/search_n.hpp
32 8 7
unsigned sort3()
in include/range/v3/algorithm/nth_element.hpp
31 6 5
static auto pipe()
in include/range/v3/utility/functional.hpp
31 7 2
static range rotate_gcd()
in include/range/v3/algorithm/rotate.hpp
29 5 3
constexpr auto operator()
in include/range/v3/begin_end.hpp
29 6 0
static auto invoke_()
in include/range/v3/view/take.hpp
29 3 2
static I1 impl()
in include/range/v3/algorithm/search.hpp
28 9 7
static I impl()
in include/range/v3/algorithm/search_n.hpp
28 9 6
auto operator()
in include/range/v3/action/action.hpp
27 15 0
void satisfy()
in include/range/v3/view/join.hpp
26 5 1
static I impl()
in include/range/v3/algorithm/stable_partition.hpp
25 7 5
static difference_type distance_to_()
in include/range/v3/view/concat.hpp
25 5 3