# Global Metrics

path: .metrics.halstead.n1
old: 18.0
new: 17.0
path: .metrics.halstead.n2
old: 49.0
new: 91.0
path: .metrics.halstead.N1
old: 608.0
new: 532.0
path: .metrics.halstead.vocabulary
old: 67.0
new: 108.0
path: .metrics.halstead.effort
old: 468222.8549506484
new: 238590.34644784476
path: .metrics.halstead.purity_ratio
old: 0.3433131690074576
new: 0.7069403638454457
path: .metrics.halstead.N2
old: 412.0
new: 404.0
path: .metrics.halstead.length
old: 1020.0
new: 936.0
path: .metrics.halstead.level
old: 0.013214670981661273
new: 0.02649970879440885
path: .metrics.halstead.volume
old: 6187.410974266928
new: 6322.574702025006
path: .metrics.halstead.estimated_program_length
old: 350.17943238760677
new: 661.6961805593371
path: .metrics.halstead.bugs
old: 2.0099279264032774
new: 1.2822734707543677
path: .metrics.halstead.difficulty
old: 75.6734693877551
new: 37.73626373626374
path: .metrics.halstead.time
old: 26012.380830591577
new: 13255.019247102486
path: .metrics.cyclomatic.average
old: 1.2926829268292683
new: 1.4375
path: .metrics.cyclomatic.sum
old: 53.0
new: 23.0
path: .metrics.nargs.average
old: 3.25
new: 1.8666666666666667
path: .metrics.nargs.sum
old: 78.0
new: 28.0
path: .metrics.loc.cloc
old: 13.0
new: 32.0
path: .metrics.loc.lloc
old: 49.0
new: 106.0
path: .metrics.loc.blank
old: 27.0
new: 45.0
path: .metrics.loc.ploc
old: 198.0
new: 215.0
path: .metrics.loc.sloc
old: 238.0
new: 292.0
path: .metrics.nom.functions
old: 24.0
new: 15.0
path: .metrics.nom.total
old: 24.0
new: 15.0
path: .metrics.nexits.sum
old: 24.0
new: 1.0
path: .metrics.nexits.average
old: 1.0
new: 0.06666666666666667
path: .metrics.cognitive.average
old: 0.5
new: 0.6
path: .metrics.cognitive.sum
old: 12.0
new: 9.0
path: .metrics.mi.mi_original
old: 24.761800588886004
new: 28.236803075799457
path: .metrics.mi.mi_sei
old: -16.87027850214246
new: -8.088830800190046
path: .metrics.mi.mi_visual_studio
old: 14.480585139699418
new: 16.512750336724828

# Spaces Data

## Minimal test - lines (15, 18)

path: .spaces[0].metrics.nargs.average
old: 0.5
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: 0.5
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.mi.mi_sei
old: 86.61463777885392
new: 101.5768813799732
path: .spaces[0].metrics.mi.mi_original
old: 88.30592012187456
new: 122.80898491437858
path: .spaces[0].metrics.mi.mi_visual_studio
old: 51.64088896016057
new: 71.81811983296993
path: .spaces[0].metrics.loc.ploc
old: 16.0
new: 4.0
path: .spaces[0].metrics.loc.cloc
old: 6.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 25.0
new: 4.0
path: .spaces[0].metrics.loc.blank
old: 3.0
new: 0.0
path: .spaces[0].metrics.halstead.volume
old: 285.2932501298081
new: 134.88627376126118
path: .spaces[0].metrics.halstead.N1
old: 34.0
new: 21.0
path: .spaces[0].metrics.halstead.N2
old: 26.0
new: 12.0
path: .spaces[0].metrics.halstead.n2
old: 14.0
new: 10.0
path: .spaces[0].metrics.halstead.difficulty
old: 12.071428571428571
new: 4.2
path: .spaces[0].metrics.halstead.n1
old: 13.0
new: 7.0
path: .spaces[0].metrics.halstead.vocabulary
old: 27.0
new: 17.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6901447540773442
new: 1.6021444061599046
path: .spaces[0].metrics.halstead.time
old: 191.3276161584824
new: 31.473463877627612
path: .spaces[0].metrics.halstead.estimated_program_length
old: 101.40868524464064
new: 52.87076540327685
path: .spaces[0].metrics.halstead.level
old: 0.08284023668639054
new: 0.23809523809523808
path: .spaces[0].metrics.halstead.bugs
old: 0.07601725603426755
new: 0.02282216165018836
path: .spaces[0].metrics.halstead.length
old: 60.0
new: 33.0
path: .spaces[0].metrics.halstead.effort
old: 3443.897090852683
new: 566.522349797297

### Code

    static PRThread* spawn(void (*run)(void*), void* arg) {
      return PR_CreateThread(PR_SYSTEM_THREAD, run, arg, PR_PRIORITY_NORMAL,
                             PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
    }

## Minimal test - lines (23, 54)

path: .spaces[1].metrics.mi.mi_original
old: 29.819415775042245
new: 81.94903492375924
path: .spaces[1].metrics.mi.mi_visual_studio
old: 17.43825483920599
new: 47.92341223611652
path: .spaces[1].metrics.mi.mi_sei
old: -22.401290621662135
new: 42.62843415753561
path: .spaces[1].metrics.halstead.n1
old: 16.0
new: 5.0
path: .spaces[1].metrics.halstead.estimated_program_length
old: 243.5249055930738
new: 103.8483063527908
path: .spaces[1].metrics.halstead.purity_ratio
old: 0.25526719663844216
new: 0.910950055726235
path: .spaces[1].metrics.halstead.difficulty
old: 86.85714285714286
new: 5.9523809523809526
path: .spaces[1].metrics.halstead.vocabulary
old: 51.0
new: 26.0
path: .spaces[1].metrics.halstead.n2
old: 35.0
new: 21.0
path: .spaces[1].metrics.halstead.bugs
old: 2.015087366884835
new: 0.07222731156604151
path: .spaces[1].metrics.halstead.level
old: 0.01151315789473684
new: 0.16799999999999998
path: .spaces[1].metrics.halstead.N1
old: 574.0
new: 64.0
path: .spaces[1].metrics.halstead.length
old: 954.0
new: 114.0
path: .spaces[1].metrics.halstead.volume
old: 5411.493776240806
new: 535.8501278680844
path: .spaces[1].metrics.halstead.effort
old: 470026.8879934872
new: 3189.5840944528836
path: .spaces[1].metrics.halstead.N2
old: 380.0
new: 50.0
path: .spaces[1].metrics.halstead.time
old: 26112.604888527065
new: 177.19911635849354
path: .spaces[1].metrics.nom.functions
old: 22.0
new: 1.0
path: .spaces[1].metrics.nom.total
old: 22.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.sum
old: 47.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.average
old: 1.3428571428571427
new: 1.0
path: .spaces[1].metrics.cognitive.sum
old: 12.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 0.5454545454545454
new: 0.0
path: .spaces[1].metrics.nexits.average
old: 1.0454545454545454
new: 0.0
path: .spaces[1].metrics.nexits.sum
old: 23.0
new: 0.0
path: .spaces[1].metrics.nargs.average
old: 3.5
new: 2.0
path: .spaces[1].metrics.nargs.sum
old: 77.0
new: 2.0
path: .spaces[1].metrics.loc.cloc
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.blank
old: 22.0
new: 4.0
path: .spaces[1].metrics.loc.ploc
old: 175.0
new: 28.0
path: .spaces[1].metrics.loc.sloc
old: 198.0
new: 32.0
path: .spaces[1].metrics.loc.lloc
old: 48.0
new: 16.0

### Code

    TEST(Synchronization, Sanity)
    {
      Mutex lock("sanity::lock");
      lock.Lock();
      lock.AssertCurrentThreadOwns();
      lock.Unlock();

      {
        MutexAutoLock autolock(lock);
        lock.AssertCurrentThreadOwns();
      }

      lock.Lock();
      lock.AssertCurrentThreadOwns();
      { MutexAutoUnlock autounlock(lock); }
      lock.AssertCurrentThreadOwns();
      lock.Unlock();

      ReentrantMonitor mon("sanity::monitor");
      mon.Enter();
      mon.AssertCurrentThreadIn();
      mon.Enter();
      mon.AssertCurrentThreadIn();
      mon.Exit();
      mon.AssertCurrentThreadIn();
      mon.Exit();

      {
        ReentrantMonitorAutoEnter automon(mon);
        mon.AssertCurrentThreadIn();
      }
    }