Global Metrics

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

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

path: .metrics.loc.cloc
old: 80.0
new: 21.0

path: .metrics.loc.lloc
old: 0.0
new: 89.0

path: .metrics.loc.ploc
old: 28.0
new: 103.0

path: .metrics.loc.blank
old: 17.0
new: 6.0

path: .metrics.loc.sloc
old: 125.0
new: 130.0

path: .metrics.nargs.sum
old: 0.0
new: 5.0

path: .metrics.nargs.average
old: null
new: 2.5

path: .metrics.halstead.difficulty
old: 5.8108108108108105
new: 42.25925925925926

path: .metrics.halstead.vocabulary
old: 47.0
new: 82.0

path: .metrics.halstead.length
old: 111.0
new: 564.0

path: .metrics.halstead.N1
old: 68.0
new: 401.0

path: .metrics.halstead.level
old: 0.17209302325581396
new: 0.02366345311130587

path: .metrics.halstead.n2
old: 37.0
new: 54.0

path: .metrics.halstead.volume
old: 616.5593625362178
new: 3585.6593306045993

path: .metrics.halstead.time
old: 199.03943385178204
new: 8418.183737077876

path: .metrics.halstead.N2
old: 43.0
new: 163.0

path: .metrics.halstead.n1
old: 10.0
new: 28.0

path: .metrics.halstead.bugs
old: 0.07804645242737585
new: 0.9474130204868472

path: .metrics.halstead.purity_ratio
old: 2.035757256550854
new: 0.7896628775433338

path: .metrics.halstead.effort
old: 3582.7098093320765
new: 151527.30726740175

path: .metrics.halstead.estimated_program_length
old: 225.9690554771448
new: 445.3698629344402

path: .metrics.cognitive.average
old: null
new: 10.5

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

path: .metrics.mi.mi_visual_studio
old: 34.31913069962754
new: 23.751762645351366

path: .metrics.mi.mi_original
old: 58.68571349636309
new: 40.61551412355084

path: .metrics.mi.mi_sei
old: 56.548905518308814
new: 16.025394807960875

path: .metrics.cyclomatic.sum
old: 3.0
new: 39.0

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

path: .metrics.nom.functions
old: 0.0
new: 2.0

path: .metrics.nom.total
old: 0.0
new: 2.0

Spaces Data

Minimal test - lines (19, 69)

path: .spaces[0].metrics.loc.cloc
old: 47.0
new: 4.0

path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 38.0

path: .spaces[0].metrics.loc.ploc
old: 22.0
new: 48.0

path: .spaces[0].metrics.loc.sloc
old: 83.0
new: 51.0

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

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

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

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

path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 17.0

path: .spaces[0].metrics.cognitive.average
old: null
new: 6.0

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

path: .spaces[0].metrics.halstead.n2
old: 33.0
new: 25.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 199.6842868877026
new: 220.13832973367943

path: .spaces[0].metrics.halstead.level
old: 0.17368421052631575
new: 0.045289855072463775

path: .spaces[0].metrics.halstead.N2
old: 38.0
new: 48.0

path: .spaces[0].metrics.halstead.bugs
old: 0.07405875655972204
new: 0.247431049742375

path: .spaces[0].metrics.halstead.N1
old: 68.0
new: 116.0

path: .spaces[0].metrics.halstead.vocabulary
old: 43.0
new: 48.0

path: .spaces[0].metrics.halstead.length
old: 106.0
new: 164.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8838140272424773
new: 1.3423068886199965

path: .spaces[0].metrics.halstead.n1
old: 10.0
new: 23.0

path: .spaces[0].metrics.halstead.volume
old: 575.1840639984224
new: 915.9338501182696

path: .spaces[0].metrics.halstead.effort
old: 3311.66582302122
new: 20223.81941061139

path: .spaces[0].metrics.halstead.time
old: 183.98143461229
new: 1123.545522811744

path: .spaces[0].metrics.halstead.difficulty
old: 5.757575757575758
new: 22.08

path: .spaces[0].metrics.mi.mi_visual_studio
old: 38.54408984160756
new: 39.72556443886934

path: .spaces[0].metrics.mi.mi_sei
old: 65.54612595801416
new: 45.05224788284568

path: .spaces[0].metrics.mi.mi_original
old: 65.91039362914893
new: 67.93071519046657

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

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

path: .spaces[0].metrics.nexits.average
old: null
new: 1.0

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

Code

extern "C" 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;
        }
    }
    // nuts, I know there's a cooler way of doing this, but it's late
    // now and it'll probably come to me in the morning.
    if (result & 0x3) result += 4 - (result & 0x3);     // ensure q-word alignment
    return result;
}