# Global Metrics

path: .metrics.mi.mi_original
old: -3.290473298713806
new: 53.6084954572638
path: .metrics.mi.mi_sei
old: -48.958024312112016
new: 26.496762805456775
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 31.34999734342912
path: .metrics.halstead.N2
old: 681.0
new: 189.0
path: .metrics.halstead.estimated_program_length
old: 803.5130232561369
new: 755.4490896208013
path: .metrics.halstead.time
old: 70976.63648001477
new: 1983.9175150672136
path: .metrics.halstead.purity_ratio
old: 0.45499038689475474
new: 1.9880239200547405
path: .metrics.halstead.difficulty
old: 103.1818181818182
new: 13.629807692307692
path: .metrics.halstead.n1
old: 30.0
new: 15.0
path: .metrics.halstead.vocabulary
old: 129.0
new: 119.0
path: .metrics.halstead.volume
old: 12381.827333077466
new: 2620.0307500570184
path: .metrics.halstead.bugs
old: 3.9246779480645175
new: 0.36147324382288265
path: .metrics.halstead.n2
old: 99.0
new: 104.0
path: .metrics.halstead.effort
old: 1277579.456640266
new: 35710.51527120984
path: .metrics.halstead.N1
old: 1085.0
new: 191.0
path: .metrics.halstead.level
old: 0.009691629955947136
new: 0.07336860670194004
path: .metrics.halstead.length
old: 1766.0
new: 380.0
path: .metrics.cyclomatic.average
old: 8.923076923076923
new: 1.0
path: .metrics.cyclomatic.sum
old: 116.0
new: 6.0
path: .metrics.cognitive.sum
old: 128.0
new: 0.0
path: .metrics.cognitive.average
old: 10.666666666666666
new: 0.0
path: .metrics.loc.ploc
old: 384.0
new: 76.0
path: .metrics.loc.cloc
old: 30.0
new: 11.0
path: .metrics.loc.blank
old: 26.0
new: 16.0
path: .metrics.loc.lloc
old: 260.0
new: 1.0
path: .metrics.loc.sloc
old: 440.0
new: 103.0
path: .metrics.nargs.sum
old: 33.0
new: 0.0
path: .metrics.nargs.average
old: 2.75
new: 0.0
path: .metrics.nom.functions
old: 12.0
new: 2.0
path: .metrics.nom.total
old: 12.0
new: 2.0
path: .metrics.nexits.average
old: 5.25
new: 0.5
path: .metrics.nexits.sum
old: 63.0
new: 1.0

# Spaces Data

## Minimal test - lines (15, 101)

path: .spaces[0].metrics.loc.cloc
old: 8.0
new: 3.0
path: .spaces[0].metrics.loc.ploc
old: 53.0
new: 71.0
path: .spaces[0].metrics.loc.lloc
old: 36.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 65.0
new: 87.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 13.0
path: .spaces[0].metrics.mi.mi_original
old: 65.14690310137699
new: 56.65627690140344
path: .spaces[0].metrics.mi.mi_visual_studio
old: 38.09760415285204
new: 33.132325673335345
path: .spaces[0].metrics.mi.mi_sei
old: 45.36454061848453
new: 20.732296806905083
path: .spaces[0].metrics.cognitive.sum
old: 20.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 20.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 12.0
new: 5.0
path: .spaces[0].metrics.cyclomatic.average
old: 12.0
new: 1.0
path: .spaces[0].metrics.nargs.average
old: 2.0
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[0].metrics.halstead.level
old: 0.03305785123966942
new: 0.07279279279279278
path: .spaces[0].metrics.halstead.N1
old: 115.0
new: 191.0
path: .spaces[0].metrics.halstead.N2
old: 55.0
new: 185.0
path: .spaces[0].metrics.halstead.n1
old: 22.0
new: 15.0
path: .spaces[0].metrics.halstead.bugs
old: 0.3053832727706997
new: 0.3595361570362718
path: .spaces[0].metrics.halstead.vocabulary
old: 42.0
new: 116.0
path: .spaces[0].metrics.halstead.length
old: 170.0
new: 376.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 184.54605750776776
new: 731.082718692059
path: .spaces[0].metrics.halstead.difficulty
old: 30.25
new: 13.737623762376238
path: .spaces[0].metrics.halstead.effort
old: 27729.992346639778
new: 35423.848367901526
path: .spaces[0].metrics.halstead.n2
old: 20.0
new: 101.0
path: .spaces[0].metrics.halstead.volume
old: 916.6939618723892
new: 2578.600854167967
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.08556504416334
new: 1.9443689326916465
path: .spaces[0].metrics.halstead.time
old: 1540.5551303688765
new: 1967.9915759945293
path: .spaces[0].metrics.nexits.average
old: 1.0
new: 0.5
path: .spaces[0].metrics.nom.functions
old: 1.0
new: 2.0
path: .spaces[0].metrics.nom.total
old: 1.0
new: 2.0

### Code

    namespace mozilla {
    namespace widget {

    class GfxInfo : public GfxInfoBase {
     public:
      GfxInfo();
      // We only declare the subset of nsIGfxInfo that we actually implement. The
      // rest is brought forward from GfxInfoBase.
      NS_IMETHOD GetD2DEnabled(bool* aD2DEnabled) override;
      NS_IMETHOD GetDWriteEnabled(bool* aDWriteEnabled) override;
      NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
      NS_IMETHOD GetEmbeddedInFirefoxReality(
          bool* aEmbeddedInFirefoxReality) override;
      NS_IMETHOD GetHasBattery(bool* aHasBattery) override;
      NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
      NS_IMETHOD GetDesktopEnvironment(nsAString& aDesktopEnvironment) override;
      NS_IMETHOD GetTestType(nsAString& aTestType) override;
      NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
      NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
      NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
      NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
      NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
      NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
      NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
      NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
      NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
      NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
      NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
      NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
      NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
      NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
      NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
      NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
      NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
      NS_IMETHOD GetAdapterDriverVersion2(
          nsAString& aAdapterDriverVersion) override;
      NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
      NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
      NS_IMETHOD GetDisplayInfo(nsTArray& aDisplayInfo) override;
      NS_IMETHOD GetDisplayWidth(nsTArray& aDisplayWidth) override;
      NS_IMETHOD GetDisplayHeight(nsTArray& aDisplayHeight) override;
      NS_IMETHOD GetDrmRenderDevice(nsACString& aDrmRenderDevice) override;

      using GfxInfoBase::GetFeatureStatus;
      using GfxInfoBase::GetFeatureSuggestedDriverVersion;

      virtual nsresult Init() override;

    #ifdef DEBUG
      NS_DECL_ISUPPORTS_INHERITED
      NS_DECL_NSIGFXINFODEBUG
    #endif

      virtual uint32_t OperatingSystemVersion() override { return mOSXVersion; }

      nsresult FindMonitors(JSContext* cx, JS::HandleObject array) override;

     protected:
      virtual ~GfxInfo() {}

      virtual nsresult GetFeatureStatusImpl(
          int32_t aFeature, int32_t* aStatus, nsAString& aSuggestedDriverVersion,
          const nsTArray& aDriverInfo, nsACString& aFailureId,
          OperatingSystem* aOS = nullptr) override;
      virtual const nsTArray& GetGfxDriverInfo() override;

     private:
      void GetDeviceInfo();
      void GetSelectedCityInfo();
      void AddCrashReportAnnotations();

      uint32_t mNumGPUsDetected;

      uint32_t mAdapterRAM[2];
      nsString mDeviceID[2];
      nsString mDriverVersion[2];
      nsString mDriverDate[2];
      nsString mDeviceKey[2];

      nsString mAdapterVendorID[2];
      nsString mAdapterDeviceID[2];

      uint32_t mOSXVersion;
    };

    }  // namespace widget
    }  // namespace mozilla