Global Metrics

path: .metrics.mi.mi_sei
old: 89.50586921747342
new: 36.89743486173842

path: .metrics.mi.mi_visual_studio
old: 55.11308711204679
new: 32.07320704419004

path: .metrics.mi.mi_original
old: 94.24337896160002
new: 54.84518404556498

path: .metrics.halstead.bugs
old: 0.015178473219005856
new: 0.2819792665005454

path: .metrics.halstead.effort
old: 307.27272727272725
new: 24604.1092531994

path: .metrics.halstead.length
old: 26.0
new: 280.0

path: .metrics.halstead.n1
old: 5.0
new: 19.0

path: .metrics.halstead.purity_ratio
old: 1.9101303184402725
new: 1.984118263489788

path: .metrics.halstead.N2
old: 13.0
new: 107.0

path: .metrics.halstead.time
old: 17.07070707070707
new: 1366.8949585110777

path: .metrics.halstead.vocabulary
old: 16.0
new: 95.0

path: .metrics.halstead.difficulty
old: 2.9545454545454546
new: 13.375

path: .metrics.halstead.n2
old: 11.0
new: 76.0

path: .metrics.halstead.volume
old: 104.0
new: 1839.559570332665

path: .metrics.halstead.N1
old: 13.0
new: 173.0

path: .metrics.halstead.level
old: 0.3384615384615385
new: 0.07476635514018691

path: .metrics.halstead.estimated_program_length
old: 49.66338827944708
new: 555.5531137771407

path: .metrics.loc.sloc
old: 25.0
new: 101.0

path: .metrics.loc.blank
old: 7.0
new: 17.0

path: .metrics.loc.ploc
old: 14.0
new: 63.0

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

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

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

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

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

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

path: .metrics.cognitive.sum
old: 0.0
new: 1.0

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

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

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

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

path: .metrics.cyclomatic.average
old: 1.0
new: 1.1111111111111112

Spaces Data

Minimal test - lines (16, 53)

path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.1428571428571428

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

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

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

path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 6.0

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

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

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

path: .spaces[0].metrics.halstead.time
old: 12.142067825150455
new: 624.3809971462197

path: .spaces[0].metrics.halstead.effort
old: 218.55722085270824
new: 11238.857948631954

path: .spaces[0].metrics.halstead.estimated_program_length
old: 35.60964047443681
new: 297.3293844521902

path: .spaces[0].metrics.halstead.bugs
old: 0.01209452597792538
new: 0.16724771769722716

path: .spaces[0].metrics.halstead.n1
old: 5.0
new: 16.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6956971654493718
new: 1.8241066530809211

path: .spaces[0].metrics.halstead.length
old: 21.0
new: 163.0

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

path: .spaces[0].metrics.halstead.N2
old: 9.0
new: 63.0

path: .spaces[0].metrics.halstead.vocabulary
old: 13.0
new: 59.0

path: .spaces[0].metrics.halstead.difficulty
old: 2.8125
new: 11.72093023255814

path: .spaces[0].metrics.halstead.volume
old: 77.70923408096293
new: 958.8708170459802

path: .spaces[0].metrics.halstead.level
old: 0.35555555555555557
new: 0.08531746031746032

path: .spaces[0].metrics.halstead.N1
old: 12.0
new: 100.0

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

path: .spaces[0].metrics.loc.ploc
old: 9.0
new: 31.0

path: .spaces[0].metrics.loc.sloc
old: 12.0
new: 38.0

path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 3.0

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

path: .spaces[0].metrics.mi.mi_original
old: 107.87904698955776
new: 74.52917114087953

path: .spaces[0].metrics.mi.mi_sei
old: 80.03753397505419
new: 53.72004860637651

path: .spaces[0].metrics.mi.mi_visual_studio
old: 63.087161982197514
new: 43.58431060870148

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

path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 1.0

Code

class InkCollectorEvent final : public _IInkCollectorEvents {
 public:
  // IUnknown
  HRESULT __stdcall QueryInterface(REFIID aRiid, void** aObject);
  virtual ULONG STDMETHODCALLTYPE AddRef() { return ++mRefCount; }
  virtual ULONG STDMETHODCALLTYPE Release() {
    MOZ_ASSERT(mRefCount);
    if (!--mRefCount) {
      delete this;
      return 0;
    }
    return mRefCount;
  }

 protected:
  // IDispatch
  STDMETHOD(GetTypeInfoCount)(UINT* aInfo) { return E_NOTIMPL; }
  STDMETHOD(GetTypeInfo)(UINT aInfo, LCID aId, ITypeInfo** aTInfo) {
    return E_NOTIMPL;
  }
  STDMETHOD(GetIDsOfNames)
  (REFIID aRiid, LPOLESTR* aStrNames, UINT aNames, LCID aId, DISPID* aDispId) {
    return E_NOTIMPL;
  }
  STDMETHOD(Invoke)
  (DISPID aDispIdMember, REFIID aRiid, LCID aId, WORD wFlags,
   DISPPARAMS* aDispParams, VARIANT* aVarResult, EXCEPINFO* aExcepInfo,
   UINT* aArgErr);

  // InkCollectorEvent
  void CursorOutOfRange(IInkCursor* aCursor) const;
  bool IsHardProximityTablet(IInkTablet* aTablet) const;

 private:
  uint32_t mRefCount = 0;

  ~InkCollectorEvent() = default;
};