Global Metrics

path: .metrics.mi.mi_sei
old: 42.90157795415458
new: -1.2890675200188753

path: .metrics.mi.mi_visual_studio
old: 29.579821937649093
new: 17.272343595608294

path: .metrics.mi.mi_original
old: 50.58149551337995
new: 29.53570754849018

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

path: .metrics.loc.lloc
old: 6.0
new: 67.0

path: .metrics.loc.cloc
old: 68.0
new: 36.0

path: .metrics.loc.ploc
old: 56.0
new: 166.0

path: .metrics.loc.sloc
old: 141.0
new: 236.0

path: .metrics.cognitive.average
old: 0.8333333333333334
new: 2.642857142857143

path: .metrics.cognitive.sum
old: 5.0
new: 37.0

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

path: .metrics.nexits.sum
old: 6.0
new: 7.0

path: .metrics.cyclomatic.sum
old: 16.0
new: 33.0

path: .metrics.cyclomatic.average
old: 1.7777777777777777
new: 2.2

path: .metrics.halstead.vocabulary
old: 61.0
new: 161.0

path: .metrics.halstead.length
old: 191.0
new: 838.0

path: .metrics.halstead.difficulty
old: 17.193181818181817
new: 38.01526717557252

path: .metrics.halstead.estimated_program_length
old: 309.70185952129685
new: 1068.5851310696614

path: .metrics.halstead.effort
old: 19475.934863874267
new: 233539.50803376368

path: .metrics.halstead.time
old: 1081.9963813263482
new: 12974.41711298687

path: .metrics.halstead.purity_ratio
old: 1.6214757042999834
new: 1.2751612542597393

path: .metrics.halstead.level
old: 0.05816259087904825
new: 0.02630522088353414

path: .metrics.halstead.volume
old: 1132.7708314745114
new: 6143.308343860049

path: .metrics.halstead.n2
old: 44.0
new: 131.0

path: .metrics.halstead.N1
old: 102.0
new: 506.0

path: .metrics.halstead.n1
old: 17.0
new: 30.0

path: .metrics.halstead.N2
old: 89.0
new: 332.0

path: .metrics.halstead.bugs
old: 0.24129275803901712
new: 1.2641122869533965

path: .metrics.nom.total
old: 6.0
new: 14.0

path: .metrics.nom.functions
old: 6.0
new: 14.0

path: .metrics.nargs.sum
old: 10.0
new: 25.0

path: .metrics.nargs.average
old: 1.6666666666666667
new: 1.7857142857142858

Spaces Data

Minimal test - lines (18, 22)

path: .spaces[0].metrics.halstead.effort
old: 702.6526501413466
new: 310.8369363238518

path: .spaces[0].metrics.halstead.time
old: 39.03625834118592
new: 17.26871868465843

path: .spaces[0].metrics.halstead.length
old: 28.0
new: 18.0

path: .spaces[0].metrics.halstead.n2
old: 5.0
new: 6.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 31.26112492884004
new: 35.161259458730164

path: .spaces[0].metrics.halstead.N2
old: 10.0
new: 8.0

path: .spaces[0].metrics.halstead.difficulty
old: 7.0
new: 4.666666666666667

path: .spaces[0].metrics.halstead.vocabulary
old: 12.0
new: 13.0

path: .spaces[0].metrics.halstead.N1
old: 18.0
new: 10.0

path: .spaces[0].metrics.halstead.level
old: 0.14285714285714285
new: 0.21428571428571427

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.1164687474585728
new: 1.9534033032627869

path: .spaces[0].metrics.halstead.bugs
old: 0.026345465163430552
new: 0.015295622567773837

path: .spaces[0].metrics.halstead.volume
old: 100.37895002019238
new: 66.60791492653966

path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 1.0

path: .spaces[0].metrics.loc.lloc
old: 2.0
new: 1.0

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

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

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

path: .spaces[0].metrics.mi.mi_original
old: 120.27055269313216
new: 122.8632240697927

path: .spaces[0].metrics.mi.mi_visual_studio
old: 70.33365654569133
new: 71.84983863730567

path: .spaces[0].metrics.mi.mi_sei
old: 98.11833752155718
new: 133.59062247336146

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

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

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

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

Code

ProfileBuffer::ProfileBuffer(ProfileChunkedBuffer& aBuffer)
    : mEntries(aBuffer) {
  // Assume the given buffer is in-session.
  MOZ_ASSERT(mEntries.IsInSession());
}

Minimal test - lines (25, 41)

path: .spaces[1].metrics.nom.total
old: 4.0
new: 1.0

path: .spaces[1].metrics.nom.functions
old: 4.0
new: 1.0

path: .spaces[1].metrics.nexits.sum
old: 4.0
new: 1.0

path: .spaces[1].metrics.mi.mi_visual_studio
old: 60.86469801393443
new: 56.952193153205826

path: .spaces[1].metrics.mi.mi_original
old: 104.07863360382788
new: 97.38825029198196

path: .spaces[1].metrics.mi.mi_sei
old: 74.96197586775148
new: 64.90251360448724

path: .spaces[1].metrics.cyclomatic.sum
old: 5.0
new: 1.0

path: .spaces[1].metrics.cognitive.average
old: 0.0
new: 1.0

path: .spaces[1].metrics.cognitive.sum
old: 0.0
new: 1.0

path: .spaces[1].metrics.nargs.sum
old: 8.0
new: 2.0

path: .spaces[1].metrics.loc.ploc
old: 6.0
new: 13.0

path: .spaces[1].metrics.loc.blank
old: 3.0
new: 4.0

path: .spaces[1].metrics.loc.lloc
old: 4.0
new: 5.0

path: .spaces[1].metrics.loc.sloc
old: 9.0
new: 17.0

path: .spaces[1].metrics.halstead.bugs
old: 0.10181463464579613
new: 0.0397648993440713

path: .spaces[1].metrics.halstead.estimated_program_length
old: 61.74860596185444
new: 96.65710673913804

path: .spaces[1].metrics.halstead.n1
old: 10.0
new: 11.0

path: .spaces[1].metrics.halstead.time
old: 296.56827269782065
new: 72.38677165937281

path: .spaces[1].metrics.halstead.N2
old: 29.0
new: 18.0

path: .spaces[1].metrics.halstead.difficulty
old: 16.11111111111111
new: 6.6

path: .spaces[1].metrics.halstead.purity_ratio
old: 0.7916487943827492
new: 2.3013596842651913

path: .spaces[1].metrics.halstead.N1
old: 49.0
new: 24.0

path: .spaces[1].metrics.halstead.length
old: 78.0
new: 42.0

path: .spaces[1].metrics.halstead.level
old: 0.06206896551724138
new: 0.15151515151515152

path: .spaces[1].metrics.halstead.n2
old: 9.0
new: 15.0

path: .spaces[1].metrics.halstead.vocabulary
old: 19.0
new: 26.0

path: .spaces[1].metrics.halstead.effort
old: 5338.228908560772
new: 1302.9618898687106

path: .spaces[1].metrics.halstead.volume
old: 331.33834604859965
new: 197.41846816192583

Code

ProfileBufferBlockIndex ProfileBuffer::AddEntry(
    ProfileChunkedBuffer& aProfileChunkedBuffer,
    const ProfileBufferEntry& aEntry) {
  switch (aEntry.GetKind()) {
#define SWITCH_KIND(KIND, TYPE, SIZE)                          \
  case ProfileBufferEntry::Kind::KIND: {                       \
    return aProfileChunkedBuffer.PutFrom(&aEntry, 1 + (SIZE)); \
  }

    FOR_EACH_PROFILE_BUFFER_ENTRY_KIND(SWITCH_KIND)

#undef SWITCH_KIND
    default:
      MOZ_ASSERT(false, "Unhandled ProfilerBuffer entry KIND");
      return ProfileBufferBlockIndex{};
  }
}