Global Metrics

path: .metrics.halstead.n2
old: 15.0
new: 59.0

path: .metrics.halstead.N1
old: 61.0
new: 123.0

path: .metrics.halstead.purity_ratio
old: 1.026048800672711
new: 1.906566232481691

path: .metrics.halstead.volume
old: 499.9649118939908
new: 1299.8631573648038

path: .metrics.halstead.time
old: 517.5562699050756
new: 745.4017540820768

path: .metrics.halstead.n1
old: 13.0
new: 14.0

path: .metrics.halstead.length
old: 104.0
new: 210.0

path: .metrics.halstead.level
old: 0.05366726296958856
new: 0.09688013136289

path: .metrics.halstead.difficulty
old: 18.633333333333333
new: 10.322033898305085

path: .metrics.halstead.N2
old: 43.0
new: 87.0

path: .metrics.halstead.estimated_program_length
old: 106.70907526996196
new: 400.3789088211551

path: .metrics.halstead.bugs
old: 0.14758157181340625
new: 0.18821490909423255

path: .metrics.halstead.effort
old: 9316.012858291362
new: 13417.231573477382

path: .metrics.halstead.vocabulary
old: 28.0
new: 73.0

path: .metrics.loc.cloc
old: 3.0
new: 17.0

path: .metrics.loc.ploc
old: 19.0
new: 64.0

path: .metrics.loc.blank
old: 4.0
new: 21.0

path: .metrics.loc.sloc
old: 26.0
new: 102.0

path: .metrics.loc.lloc
old: 9.0
new: 5.0

path: .metrics.mi.mi_visual_studio
old: 49.56329760313678
new: 32.63237789368927

path: .metrics.mi.mi_sei
old: 72.19538148302703
new: 35.68351632999455

path: .metrics.mi.mi_original
old: 84.75323890136389
new: 55.80136619820864

path: .metrics.cyclomatic.sum
old: 5.0
new: 13.0

path: .metrics.nargs.average
old: 0.75
new: 0.0

path: .metrics.nargs.sum
old: 3.0
new: 0.0

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

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

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

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

Spaces Data

Minimal test - lines (14, 14)

path: .spaces[0].metrics.nexits.average
old: 0.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.ploc
old: 4.0
new: 1.0

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

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

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

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

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

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

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

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

path: .spaces[0].metrics.halstead.estimated_program_length
old: 48.0
new: null

path: .spaces[0].metrics.halstead.bugs
old: 0.022969035790571857
new: 0.0

path: .spaces[0].metrics.halstead.n1
old: 8.0
new: 0.0

path: .spaces[0].metrics.halstead.difficulty
old: 5.5
new: 0.0

path: .spaces[0].metrics.halstead.N1
old: 15.0
new: 0.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8461538461538465
new: null

path: .spaces[0].metrics.halstead.time
old: 31.77777777777778
new: 0.0

path: .spaces[0].metrics.halstead.level
old: 0.18181818181818185
new: null

path: .spaces[0].metrics.halstead.N2
old: 11.0
new: 1.0

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

path: .spaces[0].metrics.halstead.effort
old: 572.0
new: 0.0

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

path: .spaces[0].metrics.halstead.n2
old: 8.0
new: 1.0

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

Code

class nsIWidget;

Minimal test - lines (17, 100)

path: .spaces[2].metrics.halstead.estimated_program_length
old: 21.651484454403228
new: 364.06689402563376

path: .spaces[2].metrics.halstead.volume
old: 28.52932501298081
new: 1217.4925682500675

path: .spaces[2].metrics.halstead.vocabulary
old: 9.0
new: 68.0

path: .spaces[2].metrics.halstead.length
old: 9.0
new: 200.0

path: .spaces[2].metrics.halstead.purity_ratio
old: 2.405720494933692
new: 1.8203344701281687

path: .spaces[2].metrics.halstead.time
old: 5.547368752524046
new: 692.6680969570858

path: .spaces[2].metrics.halstead.n1
old: 7.0
new: 14.0

path: .spaces[2].metrics.halstead.difficulty
old: 3.5
new: 10.24074074074074

path: .spaces[2].metrics.halstead.bugs
old: 0.007174392059877131
new: 0.17922993152483677

path: .spaces[2].metrics.halstead.N1
old: 7.0
new: 121.0

path: .spaces[2].metrics.halstead.level
old: 0.2857142857142857
new: 0.0976491862567812

path: .spaces[2].metrics.halstead.effort
old: 99.85263754543284
new: 12468.025745227544

path: .spaces[2].metrics.halstead.N2
old: 2.0
new: 79.0

path: .spaces[2].metrics.halstead.n2
old: 2.0
new: 54.0

path: .spaces[2].metrics.mi.mi_original
old: 153.34515096830847
new: 59.97711435441505

path: .spaces[2].metrics.mi.mi_sei
old: 145.63125671373976
new: 38.43125918841984

path: .spaces[2].metrics.mi.mi_visual_studio
old: 89.67552688205174
new: 35.074335879774885

path: .spaces[2].metrics.nom.functions
old: 1.0
new: 5.0

path: .spaces[2].metrics.nom.total
old: 1.0
new: 5.0

path: .spaces[2].metrics.loc.ploc
old: 1.0
new: 55.0

path: .spaces[2].metrics.loc.sloc
old: 1.0
new: 84.0

path: .spaces[2].metrics.loc.cloc
old: 0.0
new: 11.0

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

path: .spaces[2].metrics.loc.blank
old: 0.0
new: 18.0

path: .spaces[2].metrics.cyclomatic.sum
old: 1.0
new: 10.0

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

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

Code

namespace mozilla {
namespace widget {

class PlatformCompositorWidgetDelegate : public CompositorWidgetDelegate {
 public:
  virtual void NotifyClientSizeChanged(
      const LayoutDeviceIntSize& aClientSize) = 0;

  // CompositorWidgetDelegate Overrides

  PlatformCompositorWidgetDelegate* AsPlatformSpecificDelegate() override {
    return this;
  }
};

class GtkCompositorWidgetInitData;

class GtkCompositorWidget : public CompositorWidget,
                            public PlatformCompositorWidgetDelegate {
 public:
  GtkCompositorWidget(const GtkCompositorWidgetInitData& aInitData,
                      const layers::CompositorOptions& aOptions,
                      nsWindow* aWindow /* = nullptr*/);
  ~GtkCompositorWidget();

  // CompositorWidget Overrides

  already_AddRefed StartRemoteDrawing() override;
  void EndRemoteDrawing() override;

  already_AddRefed StartRemoteDrawingInRegion(
      const LayoutDeviceIntRegion& aInvalidRegion,
      layers::BufferMode* aBufferMode) override;
  void EndRemoteDrawingInRegion(
      gfx::DrawTarget* aDrawTarget,
      const LayoutDeviceIntRegion& aInvalidRegion) override;
  uintptr_t GetWidgetKey() override;

  LayoutDeviceIntSize GetClientSize() override;

  nsIWidget* RealWidget() override;
  GtkCompositorWidget* AsX11() override { return this; }
  CompositorWidgetDelegate* AsDelegate() override { return this; }

  EGLNativeWindowType GetEGLNativeWindow();
  int32_t GetDepth();

  LayoutDeviceIntRegion GetTransparentRegion() override;

#if defined(MOZ_X11)
  Display* XDisplay() const { return mXDisplay; }
  Window XWindow() const { return mXWindow; }
#endif
#if defined(MOZ_WAYLAND)
  void SetEGLNativeWindowSize(const LayoutDeviceIntSize& aEGLWindowSize);
#endif

  // PlatformCompositorWidgetDelegate Overrides

  void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override;

 protected:
  nsWindow* mWidget;

 private:
  // This field is written to on the main thread and read from on the compositor
  // or renderer thread. During window resizing, this is subject to a (largely
  // benign) read/write race, see bug 1665726. The DataMutex doesn't prevent the
  // read/write race, but it does make it Not Undefined Behaviour, and also
  // ensures we only ever use the old or new size, and not some weird synthesis
  // of the two.
  DataMutex mClientSize;

  WindowSurfaceProvider mProvider;

#if defined(MOZ_X11)
  Display* mXDisplay = {};
  Window mXWindow = {};
#endif
  int32_t mDepth = {};
};

}  // namespace widget
}  // namespace mozilla

Minimal test - lines (15, 15)

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

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

path: .spaces[1].metrics.mi.mi_visual_studio
old: 79.6369888417524
new: null

path: .spaces[1].metrics.mi.mi_sei
old: 120.866097840779
new: null

path: .spaces[1].metrics.mi.mi_original
old: 136.1792509193966
new: null

path: .spaces[1].metrics.loc.ploc
old: 3.0
new: 1.0

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

path: .spaces[1].metrics.loc.sloc
old: 3.0
new: 1.0

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

path: .spaces[1].metrics.halstead.time
old: 5.2637904788580085
new: 0.0

path: .spaces[1].metrics.halstead.n2
old: 2.0
new: 1.0

path: .spaces[1].metrics.halstead.difficulty
old: 3.75
new: 0.0

path: .spaces[1].metrics.halstead.N2
old: 3.0
new: 1.0

path: .spaces[1].metrics.halstead.bugs
old: 0.006927759642225941
new: 0.0

path: .spaces[1].metrics.halstead.purity_ratio
old: 1.5121822749374234
new: null

path: .spaces[1].metrics.halstead.level
old: 0.26666666666666666
new: null

path: .spaces[1].metrics.halstead.N1
old: 6.0
new: 0.0

path: .spaces[1].metrics.halstead.effort
old: 94.74822861944416
new: 0.0

path: .spaces[1].metrics.halstead.length
old: 9.0
new: 1.0

path: .spaces[1].metrics.halstead.n1
old: 5.0
new: 0.0

path: .spaces[1].metrics.halstead.estimated_program_length
old: 13.60964047443681
new: null

path: .spaces[1].metrics.halstead.vocabulary
old: 7.0
new: 1.0

path: .spaces[1].metrics.halstead.volume
old: 25.26619429851844
new: 0.0

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

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

Code

class nsWindow;