# Global Metrics

path: .metrics.nexits.average
old: 0.6666666666666666
new: null
path: .metrics.nexits.sum
old: 10.0
new: 0.0
path: .metrics.cognitive.average
old: 3.6666666666666665
new: null
path: .metrics.cognitive.sum
old: 55.0
new: 0.0
path: .metrics.nargs.sum
old: 53.0
new: 0.0
path: .metrics.nargs.average
old: 3.533333333333333
new: null
path: .metrics.loc.ploc
old: 454.0
new: 38.0
path: .metrics.loc.blank
old: 22.0
new: 7.0
path: .metrics.loc.cloc
old: 239.0
new: 10.0
path: .metrics.loc.sloc
old: 715.0
new: 55.0
path: .metrics.loc.lloc
old: 161.0
new: 0.0
path: .metrics.mi.mi_original
old: -1.7480714377904718
new: 70.01836692645276
path: .metrics.mi.mi_sei
old: -34.7110849764477
new: 56.400256662420674
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 40.946413407282314
path: .metrics.cyclomatic.average
old: 2.75
new: 1.0
path: .metrics.cyclomatic.sum
old: 44.0
new: 4.0
path: .metrics.nom.total
old: 15.0
new: 0.0
path: .metrics.nom.functions
old: 15.0
new: 0.0
path: .metrics.halstead.estimated_program_length
old: 12020.403174688008
new: 299.11942383385923
path: .metrics.halstead.n1
old: 31.0
new: 11.0
path: .metrics.halstead.N2
old: 2322.0
new: 58.0
path: .metrics.halstead.N1
old: 2470.0
new: 89.0
path: .metrics.halstead.difficulty
old: 30.893562231759656
new: 6.787234042553192
path: .metrics.halstead.purity_ratio
old: 2.508431380360603
new: 2.0348260124752326
path: .metrics.halstead.vocabulary
old: 1196.0
new: 58.0
path: .metrics.halstead.volume
old: 48993.41602275731
new: 861.1232062837531
path: .metrics.halstead.n2
old: 1165.0
new: 47.0
path: .metrics.halstead.level
old: 0.0323692034119641
new: 0.14733542319749215
path: .metrics.halstead.length
old: 4792.0
new: 147.0
path: .metrics.halstead.bugs
old: 4.394227641303701
new: 0.10815605155067189
path: .metrics.halstead.effort
old: 1513581.1468455438
new: 5844.644740521644
path: .metrics.halstead.time
old: 84087.8414914191
new: 324.7024855845358

# Spaces Data

## Minimal test - lines (10, 53)

path: .spaces[0].metrics.loc.ploc
old: 20.0
new: 34.0
path: .spaces[0].metrics.loc.lloc
old: 12.0
new: 0.0
path: .spaces[0].metrics.loc.cloc
old: 7.0
new: 6.0
path: .spaces[0].metrics.loc.blank
old: 0.0
new: 4.0
path: .spaces[0].metrics.loc.sloc
old: 27.0
new: 44.0
path: .spaces[0].metrics.cyclomatic.sum
old: 4.0
new: 3.0
path: .spaces[0].metrics.cyclomatic.average
old: 4.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].metrics.nexits.average
old: 2.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 2.0
new: null
path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.mi.mi_sei
old: 79.98132322024637
new: 58.45561434906692
path: .spaces[0].metrics.mi.mi_original
old: 83.0384178377285
new: 74.0156477108097
path: .spaces[0].metrics.mi.mi_visual_studio
old: 48.56047826767749
new: 43.284004509245435
path: .spaces[0].metrics.cognitive.average
old: 7.0
new: null
path: .spaces[0].metrics.cognitive.sum
old: 7.0
new: 0.0
path: .spaces[0].metrics.halstead.difficulty
old: 40.38461538461539
new: 6.722222222222222
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.105073875702269
new: 1.9804662301378169
path: .spaces[0].metrics.halstead.n1
old: 21.0
new: 11.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 140.34438221418816
new: 285.1871371398456
path: .spaces[0].metrics.halstead.N2
old: 50.0
new: 55.0
path: .spaces[0].metrics.halstead.effort
old: 26092.81422618203
new: 5621.519564551761
path: .spaces[0].metrics.halstead.level
old: 0.02476190476190476
new: 0.1487603305785124
path: .spaces[0].metrics.halstead.vocabulary
old: 34.0
new: 56.0
path: .spaces[0].metrics.halstead.length
old: 127.0
new: 144.0
path: .spaces[0].metrics.halstead.volume
old: 646.107780838793
new: 836.259108776295
path: .spaces[0].metrics.halstead.N1
old: 77.0
new: 89.0
path: .spaces[0].metrics.halstead.bugs
old: 0.2932419013478028
new: 0.10538558959602716
path: .spaces[0].metrics.halstead.n2
old: 13.0
new: 45.0
path: .spaces[0].metrics.halstead.time
old: 1449.600790343446
new: 312.3066424750978

### Code

    namespace mozilla {
    namespace widget {

    // This version of CompositorWidget implements a wrapper around
    // nsBaseWidget.
    class InProcessCompositorWidget : public CompositorWidget {
     public:
      explicit InProcessCompositorWidget(const layers::CompositorOptions& aOptions,
                                         nsBaseWidget* aWidget);

      virtual bool PreRender(WidgetRenderingContext* aManager) override;
      virtual void PostRender(WidgetRenderingContext* aManager) override;
      virtual RefPtr GetNativeLayerRoot() override;
      virtual already_AddRefed StartRemoteDrawing() override;
      virtual already_AddRefed StartRemoteDrawingInRegion(
          const LayoutDeviceIntRegion& aInvalidRegion,
          layers::BufferMode* aBufferMode) override;
      virtual void EndRemoteDrawing() override;
      virtual void EndRemoteDrawingInRegion(
          gfx::DrawTarget* aDrawTarget,
          const LayoutDeviceIntRegion& aInvalidRegion) override;
      virtual void CleanupRemoteDrawing() override;
      virtual void CleanupWindowEffects() override;
      virtual bool InitCompositor(layers::Compositor* aCompositor) override;
      virtual LayoutDeviceIntSize GetClientSize() override;
      virtual uint32_t GetGLFrameBufferFormat() override;
      virtual void ObserveVsync(VsyncObserver* aObserver) override;
      virtual uintptr_t GetWidgetKey() override;

      // If you can override this method, inherit from CompositorWidget instead.
      nsIWidget* RealWidget() override;

     protected:
      nsBaseWidget* mWidget;
      // Bug 1679368: Maintain an additional widget pointer, constant, and
      // function for sanity checking while we chase a crash.
      static const char* CANARY_VALUE;
      const char* mCanary;
      nsBaseWidget* mWidgetSanity;
      void CheckWidgetSanity();
    };

    }  // namespace widget
    }  // namespace mozilla