Global Metrics

path: .metrics.cyclomatic.average
old: 1.0
new: 6.0

path: .metrics.cyclomatic.sum
old: 5.0
new: 36.0

path: .metrics.cognitive.average
old: 0.0
new: 3.3333333333333335

path: .metrics.cognitive.sum
old: 0.0
new: 10.0

path: .metrics.loc.sloc
old: 78.0
new: 181.0

path: .metrics.loc.lloc
old: 27.0
new: 93.0

path: .metrics.loc.cloc
old: 6.0
new: 58.0

path: .metrics.loc.ploc
old: 57.0
new: 139.0

path: .metrics.loc.blank
old: 15.0
new: 0.0

path: .metrics.nargs.sum
old: 3.0
new: 9.0

path: .metrics.nargs.average
old: 1.0
new: 3.0

path: .metrics.nexits.sum
old: 3.0
new: 2.0

path: .metrics.nexits.average
old: 1.0
new: 0.6666666666666666

path: .metrics.halstead.length
old: 157.0
new: 640.0

path: .metrics.halstead.purity_ratio
old: 2.2070325430371787
new: 1.1127870225349346

path: .metrics.halstead.difficulty
old: 6.709090909090909
new: 27.204301075268816

path: .metrics.halstead.level
old: 0.14905149051490515
new: 0.036758893280632414

path: .metrics.halstead.volume
old: 942.0
new: 4389.107836881646

path: .metrics.halstead.time
old: 351.1090909090909
new: 6633.478391463897

path: .metrics.halstead.vocabulary
old: 64.0
new: 116.0

path: .metrics.halstead.bugs
old: 0.11394321386004792
new: 0.8082665907682908

path: .metrics.halstead.n1
old: 9.0
new: 23.0

path: .metrics.halstead.N2
old: 82.0
new: 220.0

path: .metrics.halstead.n2
old: 55.0
new: 93.0

path: .metrics.halstead.estimated_program_length
old: 346.50410925683707
new: 712.1836944223581

path: .metrics.halstead.effort
old: 6319.963636363636
new: 119402.61104635015

path: .metrics.halstead.N1
old: 75.0
new: 420.0

path: .metrics.mi.mi_original
old: 63.66168957983153
new: 34.892565545689436

path: .metrics.mi.mi_visual_studio
old: 37.22905823381961
new: 20.405009091046452

path: .metrics.mi.mi_sei
old: 37.48114331786712
new: 16.743948490834605

Spaces Data

Minimal test - lines (12, 59)

path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 5.0

path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 5.0

path: .spaces[0].metrics.nargs.average
old: 1.0
new: 2.0

path: .spaces[0].metrics.nargs.sum
old: 3.0
new: 2.0

path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 16.0

path: .spaces[0].metrics.cyclomatic.sum
old: 4.0
new: 16.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 227.95057052383703
new: 196.28059086766527

path: .spaces[0].metrics.halstead.effort
old: 5985.800354636823
new: 15701.800068385097

path: .spaces[0].metrics.halstead.n2
old: 38.0
new: 23.0

path: .spaces[0].metrics.halstead.time
old: 332.54446414649016
new: 872.3222260213943

path: .spaces[0].metrics.halstead.N2
old: 65.0
new: 42.0

path: .spaces[0].metrics.halstead.n1
old: 9.0
new: 21.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6282183608845504
new: 1.3085372724511015

path: .spaces[0].metrics.halstead.volume
old: 777.6424392348692
new: 818.9147427955946

path: .spaces[0].metrics.halstead.N1
old: 75.0
new: 108.0

path: .spaces[0].metrics.halstead.level
old: 0.1299145299145299
new: 0.05215419501133787

path: .spaces[0].metrics.halstead.bugs
old: 0.109890520485503
new: 0.20901544258452967

path: .spaces[0].metrics.halstead.vocabulary
old: 47.0
new: 44.0

path: .spaces[0].metrics.halstead.difficulty
old: 7.697368421052632
new: 19.17391304347826

path: .spaces[0].metrics.halstead.length
old: 140.0
new: 150.0

path: .spaces[0].metrics.mi.mi_original
old: 71.14868349037177
new: 69.72504773101693

path: .spaces[0].metrics.mi.mi_visual_studio
old: 41.60741724583144
new: 40.77488171404499

path: .spaces[0].metrics.mi.mi_sei
old: 37.912064274231334
new: 37.60764938082946

path: .spaces[0].metrics.nexits.sum
old: 3.0
new: 1.0

path: .spaces[0].metrics.nom.functions
old: 3.0
new: 1.0

path: .spaces[0].metrics.nom.total
old: 3.0
new: 1.0

path: .spaces[0].metrics.loc.lloc
old: 27.0
new: 36.0

path: .spaces[0].metrics.loc.ploc
old: 40.0
new: 47.0

path: .spaces[0].metrics.loc.blank
old: 12.0
new: 0.0

path: .spaces[0].metrics.loc.sloc
old: 53.0
new: 48.0

Code

static uint32_t
invoke_count_words(uint32_t paramCount, nsXPTCVariant* s)
{
    uint32_t result = 0;
    for(uint32_t i = 0; i < paramCount; i++, s++)
    {
        if(s->IsPtrData())
        {
            result++;
            continue;
        }
        switch(s->type)
        {
        case nsXPTType::T_I8     :
        case nsXPTType::T_I16    :
        case nsXPTType::T_I32    :
            result++;
            break;
        case nsXPTType::T_I64    :
            result+=2;
            break;
        case nsXPTType::T_U8     :
        case nsXPTType::T_U16    :
        case nsXPTType::T_U32    :
            result++;
            break;
        case nsXPTType::T_U64    :
            result+=2;
            break;
        case nsXPTType::T_FLOAT  :
            result++;
            break;
        case nsXPTType::T_DOUBLE :
            result+=2;
            break;
        case nsXPTType::T_BOOL   :
        case nsXPTType::T_CHAR   :
        case nsXPTType::T_WCHAR  :
            result++;
            break;
        default:
            // all the others are plain pointer types
            result++;
            break;
        }
    }
    return result;
}