# Global Metrics

path: .metrics.cognitive.average
old: 0.5714285714285714
new: 0.0
path: .metrics.cognitive.sum
old: 4.0
new: 0.0
path: .metrics.nom.closures
old: 2.0
new: 0.0
path: .metrics.nom.total
old: 7.0
new: 2.0
path: .metrics.nom.functions
old: 5.0
new: 2.0
path: .metrics.mi.mi_visual_studio
old: 38.95135736250558
new: 44.79150343280379
path: .metrics.mi.mi_original
old: 66.60682108988455
new: 76.59347087009449
path: .metrics.mi.mi_sei
old: 43.55571397060931
new: 71.58541081243877
path: .metrics.nargs.average
old: 0.8571428571428571
new: 1.0
path: .metrics.nargs.sum
old: 6.0
new: 2.0
path: .metrics.halstead.purity_ratio
old: 1.6130305183400877
new: 1.809321097675313
path: .metrics.halstead.estimated_program_length
old: 309.70185952129685
new: 141.1270456186744
path: .metrics.halstead.time
old: 1002.1148907348684
new: 222.4608751492194
path: .metrics.halstead.volume
old: 1138.701568812074
new: 396.82210161752647
path: .metrics.halstead.n2
old: 44.0
new: 22.0
path: .metrics.halstead.difficulty
old: 15.840909090909092
new: 10.090909090909092
path: .metrics.halstead.length
old: 192.0
new: 78.0
path: .metrics.halstead.bugs
old: 0.22926552757833824
new: 0.08405486267019918
path: .metrics.halstead.n1
old: 17.0
new: 12.0
path: .metrics.halstead.N2
old: 82.0
new: 37.0
path: .metrics.halstead.effort
old: 18038.06803322763
new: 4004.295752685949
path: .metrics.halstead.level
old: 0.06312769010043041
new: 0.09909909909909909
path: .metrics.halstead.vocabulary
old: 61.0
new: 34.0
path: .metrics.halstead.N1
old: 110.0
new: 41.0
path: .metrics.loc.sloc
old: 57.0
new: 47.0
path: .metrics.loc.blank
old: 6.0
new: 10.0
path: .metrics.loc.cloc
old: 5.0
new: 13.0
path: .metrics.loc.lloc
old: 10.0
new: 2.0
path: .metrics.loc.ploc
old: 46.0
new: 24.0
path: .metrics.nexits.sum
old: 1.0
new: 2.0
path: .metrics.nexits.average
old: 0.14285714285714285
new: 1.0
path: .metrics.cyclomatic.sum
old: 10.0
new: 4.0
path: .metrics.cyclomatic.average
old: 1.25
new: 1.0

# Spaces Data

## Minimal test - lines (24, 34)

path: .spaces[0].spaces[0].metrics.nexits.average
old: 0.14285714285714285
new: 1.0
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 6.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.8571428571428571
new: 0.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 1090.7504326488065
new: 74.23092131656186
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 78.0
new: 9.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 57.0
new: 15.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 17.0
new: 8.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 18079.188421153965
new: 381.7590239137467
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 109.0
new: 10.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.22961382464104463
new: 0.017541697587933284
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 16.575
new: 5.142857142857143
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 282.3639920967503
new: 43.65148445440323
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.06033182503770739
new: 0.1944444444444444
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.5099678721751353
new: 2.297446550231749
path: .spaces[0].spaces[0].metrics.halstead.time
old: 1004.3993567307758
new: 21.208834661874818
path: .spaces[0].spaces[0].metrics.halstead.length
old: 187.0
new: 19.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 40.0
new: 7.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 5.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 7.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.closures
old: 2.0
new: 0.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: 70.41557856728467
new: 109.526756458629
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 41.17870091654074
new: 64.05073477112806
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: 26.701912883571737
new: 125.64749459155584
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 8.0
new: 1.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 1.3333333333333333
new: 1.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 0.5714285714285714
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 4.0
new: 0.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 10.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 47.0
new: 11.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 6.0
new: 1.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 41.0
new: 5.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 0.0
new: 5.0

### Code

      NS_DECL_ISUPPORTS
      NS_DECL_NSIGZFILEWRITER

      /**
       * nsIGZFileWriter exposes two non-virtual overloads of Write().  We
       * duplicate them here so that you can call these overloads on a pointer
       * to the concrete nsGZFileWriter class.
       */
      [[nodiscard]] nsresult Write(const char* aStr) {
        return nsIGZFileWriter::Write(aStr);
      }

## Minimal test - lines (16, 45)

path: .spaces[0].metrics.nexits.average
old: 0.14285714285714285
new: 1.0
path: .spaces[0].metrics.nexits.sum
old: 1.0
new: 2.0
path: .spaces[0].metrics.cognitive.average
old: 0.5714285714285714
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 4.0
new: 0.0
path: .spaces[0].metrics.halstead.N1
old: 110.0
new: 40.0
path: .spaces[0].metrics.halstead.volume
old: 1107.158408079111
new: 361.6563306582418
path: .spaces[0].metrics.halstead.effort
old: 18133.094415246906
new: 3768.839656333257
path: .spaces[0].metrics.halstead.level
old: 0.06105733432613551
new: 0.09595959595959597
path: .spaces[0].metrics.halstead.n1
old: 17.0
new: 12.0
path: .spaces[0].metrics.halstead.bugs
old: 0.2300700183733721
new: 0.08072669748336145
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.5298756639714135
new: 1.6949338734805752
path: .spaces[0].metrics.halstead.vocabulary
old: 58.0
new: 31.0
path: .spaces[0].metrics.halstead.difficulty
old: 16.378048780487806
new: 10.421052631578949
path: .spaces[0].metrics.halstead.N2
old: 79.0
new: 33.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 289.1465004905972
new: 123.730172764082
path: .spaces[0].metrics.halstead.time
old: 1007.3941341803836
new: 209.37998090740317
path: .spaces[0].metrics.halstead.n2
old: 41.0
new: 19.0
path: .spaces[0].metrics.halstead.length
old: 189.0
new: 73.0
path: .spaces[0].metrics.loc.lloc
old: 10.0
new: 2.0
path: .spaces[0].metrics.loc.cloc
old: 1.0
new: 5.0
path: .spaces[0].metrics.loc.sloc
old: 49.0
new: 30.0
path: .spaces[0].metrics.loc.blank
old: 5.0
new: 6.0
path: .spaces[0].metrics.loc.ploc
old: 43.0
new: 19.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 40.60400039226078
new: 49.46139856555197
path: .spaces[0].metrics.mi.mi_original
old: 69.43284067076593
new: 84.57899154709386
path: .spaces[0].metrics.mi.mi_sei
old: 36.36149734688544
new: 76.18265511534716
path: .spaces[0].metrics.cyclomatic.average
old: 1.2857142857142858
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 9.0
new: 3.0
path: .spaces[0].metrics.nom.functions
old: 5.0
new: 2.0
path: .spaces[0].metrics.nom.closures
old: 2.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 7.0
new: 2.0
path: .spaces[0].metrics.nargs.sum
old: 6.0
new: 2.0
path: .spaces[0].metrics.nargs.average
old: 0.8571428571428571
new: 1.0

### Code

    class nsGZFileWriter final : public nsIGZFileWriter {
      virtual ~nsGZFileWriter();

     public:
      enum Operation { Append, Create };

      explicit nsGZFileWriter(Operation aMode = Create);

      NS_DECL_ISUPPORTS
      NS_DECL_NSIGZFILEWRITER

      /**
       * nsIGZFileWriter exposes two non-virtual overloads of Write().  We
       * duplicate them here so that you can call these overloads on a pointer
       * to the concrete nsGZFileWriter class.
       */
      [[nodiscard]] nsresult Write(const char* aStr) {
        return nsIGZFileWriter::Write(aStr);
      }

      [[nodiscard]] nsresult Write(const char* aStr, uint32_t aLen) {
        return nsIGZFileWriter::Write(aStr, aLen);
      }

     private:
      Operation mMode;
      bool mInitialized;
      bool mFinished;
      gzFile mGZFile;
    };