Global Metrics

path: .metrics.loc.sloc
old: 131.0
new: 66.0

path: .metrics.loc.blank
old: 5.0
new: 16.0

path: .metrics.loc.cloc
old: 30.0
new: 15.0

path: .metrics.loc.ploc
old: 96.0
new: 35.0

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

path: .metrics.nargs.average
old: null
new: 2.0

path: .metrics.halstead.vocabulary
old: 52.0
new: 37.0

path: .metrics.halstead.length
old: 279.0
new: 102.0

path: .metrics.halstead.volume
old: 1590.4226813613643
new: 531.3642432941529

path: .metrics.halstead.estimated_program_length
old: 266.7848737892386
new: 163.13526283059372

path: .metrics.halstead.N2
old: 100.0
new: 42.0

path: .metrics.halstead.n1
old: 7.0
new: 9.0

path: .metrics.halstead.time
old: 687.2196771314538
new: 199.26159123530732

path: .metrics.halstead.difficulty
old: 7.777777777777778
new: 6.75

path: .metrics.halstead.effort
old: 12369.954188366168
new: 3586.708642235532

path: .metrics.halstead.bugs
old: 0.17828883183121852
new: 0.07810451586912008

path: .metrics.halstead.n2
old: 45.0
new: 28.0

path: .metrics.halstead.level
old: 0.1285714285714286
new: 0.14814814814814814

path: .metrics.halstead.N1
old: 179.0
new: 60.0

path: .metrics.halstead.purity_ratio
old: 0.9562181856245112
new: 1.599365321868566

path: .metrics.cognitive.average
old: null
new: 0.0

path: .metrics.mi.mi_visual_studio
old: 31.127881203858134
new: 40.149277727430714

path: .metrics.mi.mi_original
old: 53.22867685859741
new: 68.65526491390652

path: .metrics.mi.mi_sei
old: 35.060207416092574
new: 57.82309931946088

path: .metrics.nom.functions
old: 0.0
new: 1.0

path: .metrics.nom.total
old: 0.0
new: 1.0

path: .metrics.cyclomatic.sum
old: 2.0
new: 8.0

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

Spaces Data

Minimal test - lines (13, 64)

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

path: .spaces[0].metrics.mi.mi_sei
old: 35.15362553376311
new: 58.98898781967856

path: .spaces[0].metrics.mi.mi_original
old: 56.124157299108745
new: 73.07876878647721

path: .spaces[0].metrics.mi.mi_visual_studio
old: 32.82114461936184
new: 42.73612209735509

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

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

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

path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 7.0

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

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

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

path: .spaces[0].metrics.halstead.volume
old: 1552.060452188049
new: 498.5713584425332

path: .spaces[0].metrics.halstead.estimated_program_length
old: 252.98086890659343
new: 144.62572975734892

path: .spaces[0].metrics.halstead.time
old: 673.762676918843
new: 189.4571162081626

path: .spaces[0].metrics.halstead.purity_ratio
old: 0.9199304323876124
new: 1.4757727526260094

path: .spaces[0].metrics.halstead.n2
old: 43.0
new: 25.0

path: .spaces[0].metrics.halstead.N1
old: 179.0
new: 60.0

path: .spaces[0].metrics.halstead.length
old: 275.0
new: 98.0

path: .spaces[0].metrics.halstead.vocabulary
old: 50.0
new: 34.0

path: .spaces[0].metrics.halstead.effort
old: 12127.728184539174
new: 3410.228091746927

path: .spaces[0].metrics.halstead.bugs
old: 0.1759536910888149
new: 0.07552099391810617

path: .spaces[0].metrics.halstead.level
old: 0.1279761904761905
new: 0.14619883040935672

path: .spaces[0].metrics.halstead.difficulty
old: 7.813953488372093
new: 6.84

path: .spaces[0].metrics.halstead.N2
old: 96.0
new: 38.0

path: .spaces[0].metrics.loc.sloc
old: 112.0
new: 52.0

path: .spaces[0].metrics.loc.cloc
old: 19.0
new: 8.0

path: .spaces[0].metrics.loc.ploc
old: 90.0
new: 30.0

path: .spaces[0].metrics.loc.blank
old: 3.0
new: 14.0

Code

namespace mozilla {

namespace layers {
class SynchronousTask;
}

namespace widget {

struct WinCompositorWnds {
  HWND mCompositorWnd;
  HWND mInitialParentWnd;
  WinCompositorWnds(HWND aCompositorWnd, HWND aInitialParentWnd)
      : mCompositorWnd(aCompositorWnd), mInitialParentWnd(aInitialParentWnd) {}
};

class WinCompositorWindowThread final {
  NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DELETE_ON_MAIN_THREAD(
      WinCompositorWindowThread)

 public:
  /// Can be called from any thread.
  static WinCompositorWindowThread* Get();

  /// Can only be called from the main thread.
  static void Start();

  /// Can only be called from the main thread.
  static void ShutDown();

  /// Can be called from any thread.
  static MessageLoop* Loop();

  /// Can be called from any thread.
  static bool IsInCompositorWindowThread();

  /// Can be called from any thread.
  static WinCompositorWnds CreateCompositorWindow();

  /// Can be called from any thread.
  static void DestroyCompositorWindow(WinCompositorWnds aWnds);

 private:
  explicit WinCompositorWindowThread(base::Thread* aThread);
  ~WinCompositorWindowThread();

  void ShutDownTask(layers::SynchronousTask* aTask);

  base::Thread* const mThread;
};

}  // namespace widget
}  // namespace mozilla