Global Metrics
path: .metrics.cyclomatic.sum
old: 116.0
new: 4.0
path: .metrics.cyclomatic.average
old: 2.5217391304347827
new: 1.0
path: .metrics.halstead.difficulty
old: 47.4375
new: 9.157894736842104
path: .metrics.halstead.time
old: 47291.84404816942
new: 138.63058096608884
path: .metrics.halstead.N2
old: 851.0
new: 29.0
path: .metrics.halstead.purity_ratio
old: 1.2099082955102507
new: 2.249639504801491
path: .metrics.halstead.length
old: 2146.0
new: 55.0
path: .metrics.halstead.volume
old: 17944.731338435828
new: 272.4807970712781
path: .metrics.halstead.estimated_program_length
old: 2596.463202164998
new: 123.730172764082
path: .metrics.halstead.bugs
old: 2.9939962211065128
new: 0.06132437219817874
path: .metrics.halstead.n2
old: 296.0
new: 19.0
path: .metrics.halstead.vocabulary
old: 329.0
new: 31.0
path: .metrics.halstead.n1
old: 33.0
new: 12.0
path: .metrics.halstead.N1
old: 1295.0
new: 26.0
path: .metrics.halstead.level
old: 0.021080368906455864
new: 0.10919540229885058
path: .metrics.halstead.effort
old: 851253.1928670496
new: 2495.3504573895993
path: .metrics.nargs.average
old: 0.9767441860465116
new: null
path: .metrics.nargs.sum
old: 42.0
new: 0.0
path: .metrics.mi.mi_sei
old: -56.58567781541021
new: 77.37475870551847
path: .metrics.mi.mi_original
old: -12.152615118957613
new: 78.20718928407572
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 45.735198411740186
path: .metrics.nom.functions
old: 42.0
new: 0.0
path: .metrics.nom.closures
old: 1.0
new: 0.0
path: .metrics.nom.total
old: 43.0
new: 0.0
path: .metrics.cognitive.sum
old: 83.0
new: 0.0
path: .metrics.cognitive.average
old: 1.930232558139535
new: null
path: .metrics.loc.sloc
old: 675.0
new: 48.0
path: .metrics.loc.lloc
old: 264.0
new: 0.0
path: .metrics.loc.ploc
old: 488.0
new: 23.0
path: .metrics.loc.blank
old: 111.0
new: 8.0
path: .metrics.loc.cloc
old: 76.0
new: 17.0
path: .metrics.nexits.sum
old: 59.0
new: 0.0
path: .metrics.nexits.average
old: 1.372093023255814
new: null
Spaces Data
Minimal test - lines (16, 45)
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 0.0
new: 51.131579173417215
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: -10.867845222313434
new: 87.43500038654344
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: -55.83173806992896
new: 88.16023854551958
path: .spaces[0].spaces[0].metrics.nexits.average
old: 1.372093023255814
new: null
path: .spaces[0].spaces[0].metrics.nexits.sum
old: 59.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.sum
old: 83.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: 1.930232558139535
new: null
path: .spaces[0].spaces[0].metrics.nom.functions
old: 42.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 43.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nom.closures
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].metrics.cyclomatic.sum
old: 114.0
new: 2.0
path: .spaces[0].spaces[0].metrics.cyclomatic.average
old: 2.590909090909091
new: 1.0
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 17642.658332892493
new: 218.26124091941205
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 1292.0
new: 25.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 281.0
new: 13.0
path: .spaces[0].spaces[0].metrics.halstead.length
old: 2127.0
new: 47.0
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 314.0
new: 25.0
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 49.03024911032029
new: 10.153846153846152
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 33.0
new: 12.0
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 3.0261990754872574
new: 0.05666090991772126
path: .spaces[0].spaces[0].metrics.halstead.time
old: 48056.88516833261
new: 123.1217256468478
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.1529096388908835
new: 1.938835454138044
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 2452.2388019209093
new: 91.12526634448808
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 835.0
new: 22.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 865023.9330299869
new: 2216.1910616432606
path: .spaces[0].spaces[0].metrics.halstead.level
old: 0.02039557249138087
new: 0.0984848484848485
path: .spaces[0].spaces[0].metrics.nargs.sum
old: 42.0
new: 0.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: 0.9767441860465116
new: null
path: .spaces[0].spaces[0].metrics.loc.blank
old: 108.0
new: 7.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 470.0
new: 14.0
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 645.0
new: 30.0
path: .spaces[0].spaces[0].metrics.loc.cloc
old: 67.0
new: 9.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 264.0
new: 0.0
Code
namespace net {
/**
* A limited implementation of nsIFile that wraps a FileDescriptor object
* allowing the file to be read from. Added to allow a child process to use
* an nsIFile object for a file it does not have access to on the filesystem
* but has been provided a FileDescriptor for from the parent. Many nsIFile
* methods are not implemented and this is not intended to be a general
* purpose file implementation.
*/
class FileDescriptorFile final : public nsIFile {
typedef mozilla::ipc::FileDescriptor FileDescriptor;
public:
FileDescriptorFile(const FileDescriptor& aFD, nsIFile* aFile);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFILE
private:
~FileDescriptorFile() = default;
FileDescriptorFile(const FileDescriptorFile& other);
// regular nsIFile object, that we forward most calls to.
nsCOMPtr mFile;
FileDescriptor mFD;
};
} // namespace net
Minimal test - lines (26, 43)
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_sei
old: 78.4899629613608
new: 81.25863330322862
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: 62.459855265906384
new: 56.34486865811022
path: .spaces[0].spaces[0].spaces[0].metrics.mi.mi_original
old: 106.80635250469992
new: 96.34972540536847
path: .spaces[0].spaces[0].spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.blank
old: 0.0
new: 5.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.ploc
old: 10.0
new: 12.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.sloc
old: 10.0
new: 18.0
path: .spaces[0].spaces[0].spaces[0].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].spaces[0].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.nexits.average
old: 0.0
new: null
path: .spaces[0].spaces[0].spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N2
old: 17.0
new: 21.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.level
old: 0.27450980392156865
new: 0.09523809523809525
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.volume
old: 168.55519570060713
new: 201.73835003173087
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.bugs
old: 0.024080653484237203
new: 0.054979052921289386
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.difficulty
old: 3.642857142857143
new: 10.5
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.vocabulary
old: 20.0
new: 24.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.N1
old: 22.0
new: 23.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n1
old: 6.0
new: 12.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.effort
old: 614.0224986236402
new: 2118.252675333174
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: 68.81274391313339
new: 86.03910001730775
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.purity_ratio
old: 1.7644293311059844
new: 1.9554340913024488
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.n2
old: 14.0
new: 12.0
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.time
old: 34.11236103464668
new: 117.68070418517634
path: .spaces[0].spaces[0].spaces[0].metrics.halstead.length
old: 39.0
new: 44.0
path: .spaces[0].spaces[0].spaces[0].metrics.nargs.average
old: 0.0
new: null
Code
class FileDescriptorFile final : public nsIFile {
typedef mozilla::ipc::FileDescriptor FileDescriptor;
public:
FileDescriptorFile(const FileDescriptor& aFD, nsIFile* aFile);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFILE
private:
~FileDescriptorFile() = default;
FileDescriptorFile(const FileDescriptorFile& other);
// regular nsIFile object, that we forward most calls to.
nsCOMPtr mFile;
FileDescriptor mFD;
};
Minimal test - lines (15, 46)
path: .spaces[0].metrics.nexits.average
old: 1.372093023255814
new: null
path: .spaces[0].metrics.nexits.sum
old: 59.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 115.0
new: 3.0
path: .spaces[0].metrics.cyclomatic.average
old: 2.5555555555555554
new: 1.0
path: .spaces[0].metrics.mi.mi_original
old: -11.155762300408426
new: 85.87980130523535
path: .spaces[0].metrics.mi.mi_visual_studio
old: 0.0
new: 50.22210602645342
path: .spaces[0].metrics.mi.mi_sei
old: -56.01659551828364
new: 86.59097011260768
path: .spaces[0].metrics.cognitive.average
old: 1.930232558139535
new: null
path: .spaces[0].metrics.cognitive.sum
old: 83.0
new: 0.0
path: .spaces[0].metrics.nargs.sum
old: 42.0
new: 0.0
path: .spaces[0].metrics.nargs.average
old: 0.9767441860465116
new: null
path: .spaces[0].metrics.halstead.N2
old: 836.0
new: 23.0
path: .spaces[0].metrics.halstead.bugs
old: 3.024458956608521
new: 0.05757966812002749
path: .spaces[0].metrics.halstead.N1
old: 1293.0
new: 26.0
path: .spaces[0].metrics.halstead.n2
old: 282.0
new: 14.0
path: .spaces[0].metrics.halstead.level
old: 0.02044367116137451
new: 0.10144927536231883
path: .spaces[0].metrics.halstead.n1
old: 33.0
new: 12.0
path: .spaces[0].metrics.halstead.difficulty
old: 48.91489361702128
new: 9.857142857142858
path: .spaces[0].metrics.halstead.vocabulary
old: 315.0
new: 26.0
path: .spaces[0].metrics.halstead.volume
old: 17669.01387114652
new: 230.3215461889135
path: .spaces[0].metrics.halstead.effort
old: 864277.9338248053
new: 2270.3123838621473
path: .spaces[0].metrics.halstead.length
old: 2129.0
new: 49.0
path: .spaces[0].metrics.halstead.time
old: 48015.44076804474
new: 126.12846577011928
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.156326203529962
new: 1.965765692193068
path: .spaces[0].metrics.halstead.estimated_program_length
old: 2461.818487315289
new: 96.32251891746031
path: .spaces[0].metrics.loc.lloc
old: 264.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 472.0
new: 16.0
path: .spaces[0].metrics.loc.cloc
old: 68.0
new: 10.0
path: .spaces[0].metrics.loc.sloc
old: 647.0
new: 32.0
path: .spaces[0].metrics.loc.blank
old: 107.0
new: 6.0
path: .spaces[0].metrics.nom.total
old: 43.0
new: 0.0
path: .spaces[0].metrics.nom.closures
old: 1.0
new: 0.0
path: .spaces[0].metrics.nom.functions
old: 42.0
new: 0.0
Code
namespace mozilla {
namespace net {
/**
* A limited implementation of nsIFile that wraps a FileDescriptor object
* allowing the file to be read from. Added to allow a child process to use
* an nsIFile object for a file it does not have access to on the filesystem
* but has been provided a FileDescriptor for from the parent. Many nsIFile
* methods are not implemented and this is not intended to be a general
* purpose file implementation.
*/
class FileDescriptorFile final : public nsIFile {
typedef mozilla::ipc::FileDescriptor FileDescriptor;
public:
FileDescriptorFile(const FileDescriptor& aFD, nsIFile* aFile);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIFILE
private:
~FileDescriptorFile() = default;
FileDescriptorFile(const FileDescriptorFile& other);
// regular nsIFile object, that we forward most calls to.
nsCOMPtr mFile;
FileDescriptor mFD;
};
} // namespace net
} // namespace mozilla