# Global Metrics

path: .metrics.halstead.volume
old: 518.0575847114416
new: 720.3980184303799
path: .metrics.halstead.length
old: 101.0
new: 127.0
path: .metrics.halstead.n2
old: 22.0
new: 40.0
path: .metrics.halstead.time
old: 365.6492296132523
new: 291.6611421839663
path: .metrics.halstead.N2
old: 43.0
new: 53.0
path: .metrics.halstead.effort
old: 6581.686133038542
new: 5249.900559311393
path: .metrics.halstead.n1
old: 13.0
new: 11.0
path: .metrics.halstead.estimated_program_length
old: 146.21321194585474
new: 250.93087160050476
path: .metrics.halstead.N1
old: 58.0
new: 74.0
path: .metrics.halstead.level
old: 0.07871198568872988
new: 0.137221269296741
path: .metrics.halstead.purity_ratio
old: 1.447655563820344
new: 1.9758336346496437
path: .metrics.halstead.vocabulary
old: 35.0
new: 51.0
path: .metrics.halstead.difficulty
old: 12.704545454545457
new: 7.2875
path: .metrics.halstead.bugs
old: 0.11706763832971769
new: 0.10068840551460176
path: .metrics.nargs.sum
old: 5.0
new: 0.0
path: .metrics.nargs.average
old: 1.6666666666666667
new: 0.0
path: .metrics.mi.mi_sei
old: 75.17562585498513
new: 54.216297858012254
path: .metrics.mi.mi_visual_studio
old: 47.965001823970965
new: 40.64261012551608
path: .metrics.mi.mi_original
old: 82.02015311899035
new: 69.4988633146325
path: .metrics.nom.functions
old: 3.0
new: 1.0
path: .metrics.nom.total
old: 3.0
new: 1.0
path: .metrics.loc.ploc
old: 18.0
new: 39.0
path: .metrics.loc.cloc
old: 6.0
new: 10.0
path: .metrics.loc.lloc
old: 6.0
new: 0.0
path: .metrics.loc.sloc
old: 30.0
new: 61.0
path: .metrics.loc.blank
old: 6.0
new: 12.0
path: .metrics.cognitive.sum
old: 1.0
new: 0.0
path: .metrics.cognitive.average
old: 0.3333333333333333
new: 0.0
path: .metrics.cyclomatic.sum
old: 6.0
new: 3.0
path: .metrics.cyclomatic.average
old: 1.2
new: 1.0

# Spaces Data

## Minimal test - lines (24, 28)

path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.1875
new: 0.5
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 5.333333333333333
new: 2.0
path: .spaces[0].spaces[0].metrics.halstead.time
old: 22.56210324182284
new: 5.765719364395496
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.975488750216347
new: 1.8434322969602153
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 8.0
new: 4.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 6.0
new: 7.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 14.0
new: 11.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 39.50977500432694
new: 27.651484454403228
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 406.1178583528111
new: 103.78294855911892
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 12.0
new: 8.0
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 8.0
new: 7.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.018280166067772708
new: 0.007361439526411013
path: .spaces[0].spaces[0].metrics.halstead.length
old: 20.0
new: 15.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 76.14709844115208
new: 51.89147427955946
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 112.5898782602082
new: 103.5281516414162
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 76.28222962071868
new: 72.60906572784108
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 130.44261265142893
new: 124.16150239460823
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 3.0
new: 5.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 3.0
new: 5.0

### Code

      nsAppShell()
          : mEventWnd(nullptr),
            mNativeCallbackPending(false),
            mLastNativeEventScheduledMutex(
                "nsAppShell::mLastNativeEventScheduledMutex") {}

## Minimal test - lines (22, 59)

path: .spaces[0].metrics.mi.mi_sei
old: 51.94228453378061
new: 36.78662884389436
path: .spaces[0].metrics.mi.mi_original
old: 88.12259945832577
new: 77.82922789275744
path: .spaces[0].metrics.mi.mi_visual_studio
old: 51.53368389375776
new: 45.514168358337685
path: .spaces[0].metrics.nom.functions
old: 3.0
new: 1.0
path: .spaces[0].metrics.nom.total
old: 3.0
new: 1.0
path: .spaces[0].metrics.loc.ploc
old: 17.0
new: 30.0
path: .spaces[0].metrics.loc.lloc
old: 6.0
new: 0.0
path: .spaces[0].metrics.loc.sloc
old: 21.0
new: 38.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 8.0
path: .spaces[0].metrics.halstead.volume
old: 508.7462841250339
new: 662.8274347268416
path: .spaces[0].metrics.halstead.length
old: 100.0
new: 120.0
path: .spaces[0].metrics.halstead.vocabulary
old: 34.0
new: 46.0
path: .spaces[0].metrics.halstead.n2
old: 21.0
new: 35.0
path: .spaces[0].metrics.halstead.difficulty
old: 13.0
new: 7.385714285714286
path: .spaces[0].metrics.halstead.level
old: 0.07692307692307693
new: 0.13539651837524178
path: .spaces[0].metrics.halstead.estimated_program_length
old: 140.34438221418816
new: 217.57865339808407
path: .spaces[0].metrics.halstead.bugs
old: 0.11744696909316532
new: 0.09610383782072146
path: .spaces[0].metrics.halstead.time
old: 367.4278718680801
new: 271.9696696458548
path: .spaces[0].metrics.halstead.N1
old: 58.0
new: 73.0
path: .spaces[0].metrics.halstead.N2
old: 42.0
new: 47.0
path: .spaces[0].metrics.halstead.n1
old: 13.0
new: 11.0
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.4034438221418817
new: 1.813155444984034
path: .spaces[0].metrics.halstead.effort
old: 6613.701693625441
new: 4895.454053625387
path: .spaces[0].metrics.cognitive.average
old: 0.3333333333333333
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 5.0
new: 2.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.25
new: 1.0
path: .spaces[0].metrics.nargs.sum
old: 5.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 1.6666666666666667
new: 0.0

### Code

    class nsAppShell : public nsBaseAppShell {
     public:
      nsAppShell()
          : mEventWnd(nullptr),
            mNativeCallbackPending(false),
            mLastNativeEventScheduledMutex(
                "nsAppShell::mLastNativeEventScheduledMutex") {}
      typedef mozilla::TimeStamp TimeStamp;
      typedef mozilla::Mutex Mutex;

      nsresult Init();
      void DoProcessMoreGeckoEvents();

      static UINT GetTaskbarButtonCreatedMessage();

      NS_IMETHOD AfterProcessNextEvent(nsIThreadInternal* thread,
                                       bool eventWasProcessed) final;

     protected:
      NS_IMETHOD Run() override;
      NS_IMETHOD Exit() override;
      NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
                         const char16_t* aData) override;

      virtual void ScheduleNativeEventCallback();
      virtual bool ProcessNextNativeEvent(bool mayWait);
      virtual ~nsAppShell();

      static LRESULT CALLBACK EventWindowProc(HWND, UINT, WPARAM, LPARAM);

     protected:
      HWND mEventWnd;
      bool mNativeCallbackPending;

      Mutex mLastNativeEventScheduledMutex;
      TimeStamp mLastNativeEventScheduled;
      std::vector mMsgsToRepost;
    };