# Global Metrics

path: .metrics.cyclomatic.sum
old: 156.0
new: 8.0
path: .metrics.cyclomatic.average
old: 6.0
new: 1.3333333333333333
path: .metrics.loc.blank
old: 109.0
new: 5.0
path: .metrics.loc.cloc
old: 101.0
new: 7.0
path: .metrics.loc.ploc
old: 732.0
new: 33.0
path: .metrics.loc.sloc
old: 942.0
new: 45.0
path: .metrics.loc.lloc
old: 386.0
new: 5.0
path: .metrics.mi.mi_original
old: -29.887341129786023
new: 73.05676624557186
path: .metrics.mi.mi_sei
old: -78.64554521801202
new: 59.19709565720888
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 42.72325511436951
path: .metrics.halstead.n2
old: 281.0
new: 36.0
path: .metrics.halstead.purity_ratio
old: 0.6282695996223958
new: 2.052522483133472
path: .metrics.halstead.N1
old: 2283.0
new: 75.0
path: .metrics.halstead.N2
old: 1662.0
new: 55.0
path: .metrics.halstead.vocabulary
old: 318.0
new: 55.0
path: .metrics.halstead.volume
old: 32794.32325859678
new: 751.5767627582057
path: .metrics.halstead.time
old: 199352.91760222916
new: 606.0167570079668
path: .metrics.halstead.bugs
old: 7.812837882859392
new: 0.1639520447395879
path: .metrics.halstead.level
old: 0.009139103001918886
new: 0.06889952153110047
path: .metrics.halstead.estimated_program_length
old: 2478.5235705103514
new: 266.82792280735134
path: .metrics.halstead.length
old: 3945.0
new: 130.0
path: .metrics.halstead.effort
old: 3588352.516840125
new: 10908.301626143402
path: .metrics.halstead.n1
old: 37.0
new: 19.0
path: .metrics.halstead.difficulty
old: 109.41992882562278
new: 14.51388888888889
path: .metrics.nom.functions
old: 25.0
new: 3.0
path: .metrics.nom.total
old: 25.0
new: 3.0
path: .metrics.nexits.average
old: 1.6
new: 0.6666666666666666
path: .metrics.nexits.sum
old: 40.0
new: 2.0
path: .metrics.cognitive.sum
old: 252.0
new: 3.0
path: .metrics.cognitive.average
old: 10.08
new: 1.0
path: .metrics.nargs.sum
old: 22.0
new: 7.0
path: .metrics.nargs.average
old: 0.88
new: 2.3333333333333335

# Spaces Data

## Minimal test - lines (13, 45)

path: .spaces[0].metrics.nom.functions
old: 1.0
new: 3.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 3.0
path: .spaces[0].metrics.cognitive.average
old: 3.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.average
old: 4.0
new: 1.4
path: .spaces[0].metrics.cyclomatic.sum
old: 4.0
new: 7.0
path: .spaces[0].metrics.mi.mi_original
old: 82.55123358728973
new: 78.64039479222647
path: .spaces[0].metrics.mi.mi_visual_studio
old: 48.27557519724546
new: 45.98853496621431
path: .spaces[0].metrics.mi.mi_sei
old: 62.68709455530343
new: 57.07631194916239
path: .spaces[0].metrics.nargs.average
old: 1.0
new: 2.3333333333333335
path: .spaces[0].metrics.nargs.sum
old: 1.0
new: 7.0
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.6666666666666666
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 2.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.0202515542555712
new: 1.87432566701937
path: .spaces[0].metrics.halstead.bugs
old: 0.0994672030109923
new: 0.16296361769152523
path: .spaces[0].metrics.halstead.length
old: 90.0
new: 125.0
path: .spaces[0].metrics.halstead.n2
old: 15.0
new: 31.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 91.8226398830014
new: 234.29070837742125
path: .spaces[0].metrics.halstead.time
old: 286.3711317027747
new: 600.5447334549717
path: .spaces[0].metrics.halstead.difficulty
old: 12.333333333333334
new: 15.32258064516129
path: .spaces[0].metrics.halstead.vocabulary
old: 25.0
new: 50.0
path: .spaces[0].metrics.halstead.volume
old: 417.9470570797252
new: 705.4820237218405
path: .spaces[0].metrics.halstead.effort
old: 5154.680370649944
new: 10809.805202189493
path: .spaces[0].metrics.halstead.N1
old: 53.0
new: 75.0
path: .spaces[0].metrics.halstead.N2
old: 37.0
new: 50.0
path: .spaces[0].metrics.halstead.level
old: 0.08108108108108107
new: 0.06526315789473684
path: .spaces[0].metrics.halstead.n1
old: 10.0
new: 19.0
path: .spaces[0].metrics.loc.sloc
old: 32.0
new: 33.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 3.0
path: .spaces[0].metrics.loc.lloc
old: 20.0
new: 5.0
path: .spaces[0].metrics.loc.ploc
old: 26.0
new: 28.0

### Code

    namespace mozilla {
    namespace widget {

    /* static */
    RefPtr CompositorWidget::CreateLocal(
        const CompositorWidgetInitData& aInitData,
        const layers::CompositorOptions& aOptions, nsIWidget* aWidget) {
      if (aInitData.type() ==
          CompositorWidgetInitData::THeadlessCompositorWidgetInitData) {
        return new HeadlessCompositorWidget(
            aInitData.get_HeadlessCompositorWidgetInitData(), aOptions,
            static_cast(aWidget));
      } else {
        return new InProcessGtkCompositorWidget(
            aInitData.get_GtkCompositorWidgetInitData(), aOptions,
            static_cast(aWidget));
      }
    }

    InProcessGtkCompositorWidget::InProcessGtkCompositorWidget(
        const GtkCompositorWidgetInitData& aInitData,
        const layers::CompositorOptions& aOptions, nsWindow* aWindow)
        : GtkCompositorWidget(aInitData, aOptions, aWindow) {}

    void InProcessGtkCompositorWidget::ObserveVsync(VsyncObserver* aObserver) {
      if (RefPtr cvd =
              mWidget->GetCompositorVsyncDispatcher()) {
        cvd->SetCompositorVsyncObserver(aObserver);
      }
    }

    }  // namespace widget
    }  // namespace mozilla