Global Metrics

path: .metrics.nom.functions
old: 4.0
new: 9.0

path: .metrics.nom.total
old: 4.0
new: 9.0

path: .metrics.cognitive.sum
old: 13.0
new: 2.0

path: .metrics.cognitive.average
old: 3.25
new: 0.2222222222222222

path: .metrics.nargs.sum
old: 7.0
new: 33.0

path: .metrics.nargs.average
old: 1.75
new: 3.6666666666666665

path: .metrics.mi.mi_visual_studio
old: 29.454121331795324
new: 16.277001789582812

path: .metrics.mi.mi_sei
old: 16.178923633756504
new: 0.13055853566540776

path: .metrics.mi.mi_original
old: 50.366547477370005
new: 27.833673060186612

path: .metrics.halstead.n1
old: 24.0
new: 19.0

path: .metrics.halstead.length
old: 412.0
new: 858.0

path: .metrics.halstead.time
old: 4848.441563231772
new: 11444.86661300547

path: .metrics.halstead.estimated_program_length
old: 471.81407760864386
new: 657.0508981114376

path: .metrics.halstead.purity_ratio
old: 1.1451798000209803
new: 0.7657935875424681

path: .metrics.halstead.N1
old: 244.0
new: 525.0

path: .metrics.halstead.N2
old: 168.0
new: 333.0

path: .metrics.halstead.vocabulary
old: 85.0
new: 108.0

path: .metrics.halstead.volume
old: 2640.669065688733
new: 5795.693476856256

path: .metrics.halstead.n2
old: 61.0
new: 89.0

path: .metrics.halstead.bugs
old: 0.6558359097075076
new: 1.1626997318755088

path: .metrics.halstead.effort
old: 87271.94813817191
new: 206007.59903409847

path: .metrics.halstead.difficulty
old: 33.049180327868854
new: 35.54494382022472

path: .metrics.halstead.level
old: 0.030257936507936508
new: 0.02813339655444919

path: .metrics.cyclomatic.average
old: 4.4
new: 1.8571428571428572

path: .metrics.cyclomatic.sum
old: 22.0
new: 26.0

path: .metrics.nexits.sum
old: 1.0
new: 5.0

path: .metrics.nexits.average
old: 0.25
new: 0.5555555555555556

path: .metrics.loc.blank
old: 14.0
new: 48.0

path: .metrics.loc.sloc
old: 100.0
new: 295.0

path: .metrics.loc.lloc
old: 31.0
new: 18.0

path: .metrics.loc.ploc
old: 81.0
new: 183.0

path: .metrics.loc.cloc
old: 5.0
new: 64.0

Spaces Data

Minimal test - lines (59, 61)

path: .spaces[0].metrics.halstead.volume
old: 104.0
new: 20.89735285398626

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8531080564378477
new: 0.7505430557959409

path: .spaces[0].metrics.halstead.time
old: 37.14285714285714
new: 2.6121691067482824

path: .spaces[0].metrics.halstead.level
old: 0.15555555555555556
new: 0.4444444444444444

path: .spaces[0].metrics.halstead.effort
old: 668.5714285714286
new: 47.01904392146909

path: .spaces[0].metrics.halstead.difficulty
old: 6.428571428571429
new: 2.25

path: .spaces[0].metrics.halstead.n2
old: 7.0
new: 2.0

path: .spaces[0].metrics.halstead.bugs
old: 0.025486524748024285
new: 0.004342381155389963

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

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

path: .spaces[0].metrics.halstead.length
old: 26.0
new: 9.0

path: .spaces[0].metrics.halstead.vocabulary
old: 16.0
new: 5.0

path: .spaces[0].metrics.halstead.N1
old: 16.0
new: 6.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 6.754887502163468

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

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

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

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

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

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

path: .spaces[0].metrics.loc.sloc
old: 4.0
new: 3.0

path: .spaces[0].metrics.loc.ploc
old: 4.0
new: 3.0

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

path: .spaces[0].metrics.mi.mi_sei
old: 103.52771346566632
new: 122.29031634298596

path: .spaces[0].metrics.mi.mi_visual_studio
old: 72.60888811363898
new: 80.2142947126916

path: .spaces[0].metrics.mi.mi_original
old: 124.16119867432266
new: 137.16644395870264

Code

namespace geckoprofiler::category {
using namespace ::mozilla::baseprofiler::category;
}

Minimal test - lines (99, 109)

path: .spaces[3].metrics.cyclomatic.average
old: 6.0
new: 3.0

path: .spaces[3].metrics.cyclomatic.sum
old: 6.0
new: 3.0

path: .spaces[3].metrics.halstead.level
old: 0.0587515299877601
new: 0.14782608695652175

path: .spaces[3].metrics.halstead.n2
old: 24.0
new: 17.0

path: .spaces[3].metrics.halstead.N2
old: 43.0
new: 23.0

path: .spaces[3].metrics.halstead.vocabulary
old: 43.0
new: 27.0

path: .spaces[3].metrics.halstead.estimated_program_length
old: 190.74972277273588
new: 102.7061492501294

path: .spaces[3].metrics.halstead.N1
old: 65.0
new: 35.0

path: .spaces[3].metrics.halstead.bugs
old: 0.15445991145579804
new: 0.050515367612403266

path: .spaces[3].metrics.halstead.n1
old: 19.0
new: 10.0

path: .spaces[3].metrics.halstead.time
old: 554.1572880739517
new: 103.6441164687266

path: .spaces[3].metrics.halstead.volume
old: 586.0365935078265
new: 275.7834751254812

path: .spaces[3].metrics.halstead.effort
old: 9974.83118533113
new: 1865.5940964370784

path: .spaces[3].metrics.halstead.length
old: 108.0
new: 58.0

path: .spaces[3].metrics.halstead.difficulty
old: 17.020833333333332
new: 6.764705882352941

path: .spaces[3].metrics.halstead.purity_ratio
old: 1.7662011367845916
new: 1.7707956767263686

path: .spaces[3].metrics.nexits.average
old: 0.0
new: 2.0

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

path: .spaces[3].metrics.nargs.sum
old: 3.0
new: 5.0

path: .spaces[3].metrics.nargs.average
old: 3.0
new: 5.0

path: .spaces[3].metrics.mi.mi_sei
old: 51.7915607617324
new: 72.10876832090217

path: .spaces[3].metrics.mi.mi_visual_studio
old: 51.43131552761169
new: 59.79069773925108

path: .spaces[3].metrics.mi.mi_original
old: 87.94754955221599
new: 102.24209313411936

path: .spaces[3].metrics.cognitive.average
old: 3.0
new: 1.0

path: .spaces[3].metrics.cognitive.sum
old: 3.0
new: 1.0

path: .spaces[3].metrics.loc.blank
old: 2.0
new: 0.0

path: .spaces[3].metrics.loc.lloc
old: 7.0
new: 3.0

path: .spaces[3].metrics.loc.ploc
old: 18.0
new: 11.0

path: .spaces[3].metrics.loc.sloc
old: 20.0
new: 11.0

Code

mozilla::ProfileBufferBlockIndex profiler_add_marker(
    const mozilla::ProfilerString8View& aName,
    const mozilla::MarkerCategory& aCategory, mozilla::MarkerOptions&& aOptions,
    MarkerType aMarkerType, const PayloadArguments&... aPayloadArguments) {
  if (!profiler_can_accept_markers()) {
    return {};
  }
  return ::AddMarkerToBuffer(profiler_markers_detail::CachedCoreBuffer(), aName,
                             aCategory, std::move(aOptions), aMarkerType,
                             aPayloadArguments...);
}

Minimal test - lines (68, 78)

path: .spaces[1].metrics.nargs.average
old: 2.0
new: 6.0

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

path: .spaces[1].metrics.halstead.bugs
old: 0.25799832512316184
new: 0.06417626771047087

path: .spaces[1].metrics.halstead.purity_ratio
old: 1.4750799174172746
new: 1.9160649071082976

path: .spaces[1].metrics.halstead.level
old: 0.04548685145700071
new: 0.1272727272727273

path: .spaces[1].metrics.halstead.difficulty
old: 21.984375
new: 7.857142857142857

path: .spaces[1].metrics.halstead.effort
old: 21533.132462602214
new: 2671.428571428571

path: .spaces[1].metrics.halstead.estimated_program_length
old: 252.23866587835397
new: 130.29241368336423

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

path: .spaces[1].metrics.halstead.time
old: 1196.2851368112342
new: 148.4126984126984

path: .spaces[1].metrics.halstead.length
old: 171.0
new: 68.0

path: .spaces[1].metrics.halstead.n2
old: 32.0
new: 21.0

path: .spaces[1].metrics.halstead.volume
old: 979.474397730307
new: 340.0

path: .spaces[1].metrics.halstead.N2
old: 67.0
new: 30.0

path: .spaces[1].metrics.halstead.vocabulary
old: 53.0
new: 32.0

path: .spaces[1].metrics.halstead.N1
old: 104.0
new: 38.0

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

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

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

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

path: .spaces[1].metrics.loc.sloc
old: 33.0
new: 11.0

path: .spaces[1].metrics.loc.lloc
old: 13.0
new: 3.0

path: .spaces[1].metrics.loc.ploc
old: 32.0
new: 11.0

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

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

path: .spaces[1].metrics.cyclomatic.average
old: 11.0
new: 2.0

path: .spaces[1].metrics.cyclomatic.sum
old: 11.0
new: 2.0

path: .spaces[1].metrics.mi.mi_visual_studio
old: 44.452686426750546
new: 59.28864290590251

path: .spaces[1].metrics.mi.mi_original
old: 76.01409378974343
new: 101.3835793690933

path: .spaces[1].metrics.mi.mi_sei
old: 35.08432260956772
new: 93.28328845720378

Code

mozilla::ProfileBufferBlockIndex AddMarkerToBuffer(
    mozilla::ProfileChunkedBuffer& aBuffer,
    const mozilla::ProfilerString8View& aName,
    const mozilla::MarkerCategory& aCategory, mozilla::MarkerOptions&& aOptions,
    MarkerType aMarkerType, const PayloadArguments&... aPayloadArguments) {
  AUTO_PROFILER_LABEL("AddMarkerToBuffer", PROFILER);
  mozilla::Unused << aMarkerType;  // Only the empty object type is useful.
  return mozilla::base_profiler_markers_detail::AddMarkerToBuffer(
      aBuffer, aName, aCategory, std::move(aOptions),
      ::profiler_capture_backtrace_into, aPayloadArguments...);
}

Minimal test - lines (81, 88)

path: .spaces[2].metrics.halstead.N2
old: 27.0
new: 17.0

path: .spaces[2].metrics.halstead.n2
old: 17.0
new: 12.0

path: .spaces[2].metrics.halstead.time
old: 235.00942014893496
new: 71.55817134610396

path: .spaces[2].metrics.halstead.purity_ratio
old: 2.022528307594784
new: 1.5554103265572758

path: .spaces[2].metrics.halstead.vocabulary
old: 33.0
new: 21.0

path: .spaces[2].metrics.halstead.volume
old: 332.93001187765793
new: 202.04660144782295

path: .spaces[2].metrics.halstead.level
old: 0.0787037037037037
new: 0.1568627450980392

path: .spaces[2].metrics.halstead.estimated_program_length
old: 133.48686830125575
new: 71.54887502163469

path: .spaces[2].metrics.halstead.bugs
old: 0.08718677146146715
new: 0.03946086229411257

path: .spaces[2].metrics.halstead.n1
old: 16.0
new: 9.0

path: .spaces[2].metrics.halstead.N1
old: 39.0
new: 29.0

path: .spaces[2].metrics.halstead.difficulty
old: 12.705882352941176
new: 6.375

path: .spaces[2].metrics.halstead.length
old: 66.0
new: 46.0

path: .spaces[2].metrics.halstead.effort
old: 4230.16956268083
new: 1288.0470842298714

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

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

path: .spaces[2].metrics.nargs.average
old: 2.0
new: 5.0

path: .spaces[2].metrics.nargs.sum
old: 2.0
new: 5.0

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

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

path: .spaces[2].metrics.loc.lloc
old: 4.0
new: 1.0

path: .spaces[2].metrics.loc.ploc
old: 11.0
new: 8.0

path: .spaces[2].metrics.loc.sloc
old: 11.0
new: 8.0

path: .spaces[2].metrics.cyclomatic.sum
old: 3.0
new: 2.0

path: .spaces[2].metrics.cyclomatic.average
old: 3.0
new: 2.0

path: .spaces[2].metrics.mi.mi_original
old: 101.26284865525102
new: 109.2488554954268

path: .spaces[2].metrics.mi.mi_visual_studio
old: 59.218040149269605
new: 63.88821958796888

path: .spaces[2].metrics.mi.mi_sei
old: 70.69601716742092
new: 82.11556977284337

Code

inline mozilla::ProfileBufferBlockIndex AddMarkerToBuffer(
    mozilla::ProfileChunkedBuffer& aBuffer,
    const mozilla::ProfilerString8View& aName,
    const mozilla::MarkerCategory& aCategory,
    mozilla::MarkerOptions&& aOptions = {}) {
  return AddMarkerToBuffer(aBuffer, aName, aCategory, std::move(aOptions),
                           mozilla::baseprofiler::markers::NoPayload{});
}