Global Metrics
path: .metrics.halstead.effort
old: 616408.1462487656
new: 5165.881458046691
path: .metrics.halstead.N2
old: 720.0
new: 58.0
path: .metrics.halstead.level
old: 0.023045267489711932
new: 0.13479623824451412
path: .metrics.halstead.n2
old: 224.0
new: 43.0
path: .metrics.halstead.difficulty
old: 43.392857142857146
new: 7.4186046511627906
path: .metrics.halstead.n1
old: 27.0
new: 11.0
path: .metrics.halstead.time
old: 34244.897013820315
new: 286.99341433592724
path: .metrics.halstead.length
old: 1782.0
new: 121.0
path: .metrics.halstead.purity_ratio
old: 1.0534396549378882
new: 2.2428358037785165
path: .metrics.halstead.bugs
old: 2.4142986507117414
new: 0.099611245271575
path: .metrics.halstead.estimated_program_length
old: 1877.2294650993167
new: 271.3831322572005
path: .metrics.halstead.N1
old: 1062.0
new: 63.0
path: .metrics.halstead.vocabulary
old: 251.0
new: 54.0
path: .metrics.halstead.volume
old: 14205.290613140276
new: 696.3413877617796
path: .metrics.mi.mi_visual_studio
old: 0.0
new: 37.6741403436779
path: .metrics.mi.mi_original
old: -6.635652726408821
new: 64.42277998768921
path: .metrics.mi.mi_sei
old: -44.992074153510785
new: 56.04243235972881
path: .metrics.nom.total
old: 70.0
new: 0.0
path: .metrics.nom.functions
old: 70.0
new: 0.0
path: .metrics.nexits.average
old: 0.8714285714285714
new: null
path: .metrics.nexits.sum
old: 61.0
new: 0.0
path: .metrics.cognitive.average
old: 0.32857142857142857
new: null
path: .metrics.cognitive.sum
old: 23.0
new: 0.0
path: .metrics.loc.blank
old: 74.0
new: 10.0
path: .metrics.loc.cloc
old: 74.0
new: 26.0
path: .metrics.loc.lloc
old: 104.0
new: 0.0
path: .metrics.loc.sloc
old: 496.0
new: 82.0
path: .metrics.loc.ploc
old: 348.0
new: 46.0
path: .metrics.cyclomatic.average
old: 1.4
new: 1.0
path: .metrics.cyclomatic.sum
old: 119.0
new: 5.0
path: .metrics.nargs.sum
old: 29.0
new: 0.0
path: .metrics.nargs.average
old: 0.4142857142857143
new: null
Spaces Data
Minimal test - lines (25, 80)
path: .spaces[1].metrics.nexits.average
old: 1.0
new: null
path: .spaces[1].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[1].metrics.halstead.volume
old: 411.1982937621106
new: 611.0047736845402
path: .spaces[1].metrics.halstead.time
old: 135.50852862615008
new: 248.92787076036825
path: .spaces[1].metrics.halstead.estimated_program_length
old: 126.63682062300134
new: 224.17104785693348
path: .spaces[1].metrics.halstead.effort
old: 2439.1535152707015
new: 4480.701673686628
path: .spaces[1].metrics.halstead.n2
old: 22.0
new: 36.0
path: .spaces[1].metrics.halstead.N2
old: 29.0
new: 48.0
path: .spaces[1].metrics.halstead.difficulty
old: 5.931818181818182
new: 7.333333333333333
path: .spaces[1].metrics.halstead.level
old: 0.1685823754789272
new: 0.13636363636363638
path: .spaces[1].metrics.halstead.length
old: 83.0
new: 110.0
path: .spaces[1].metrics.halstead.vocabulary
old: 31.0
new: 47.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.5257448267831486
new: 2.0379186168812136
path: .spaces[1].metrics.halstead.bugs
old: 0.06040017104145546
new: 0.090596085207847
path: .spaces[1].metrics.halstead.n1
old: 9.0
new: 11.0
path: .spaces[1].metrics.halstead.N1
old: 54.0
new: 62.0
path: .spaces[1].metrics.cyclomatic.sum
old: 2.0
new: 3.0
path: .spaces[1].metrics.mi.mi_sei
old: 59.84750854533611
new: 66.58769484938017
path: .spaces[1].metrics.mi.mi_visual_studio
old: 49.205502620188994
new: 41.95365952950557
path: .spaces[1].metrics.mi.mi_original
old: 84.14140948052318
new: 71.74075779545453
path: .spaces[1].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[1].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[1].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[1].metrics.loc.ploc
old: 23.0
new: 31.0
path: .spaces[1].metrics.loc.blank
old: 6.0
new: 7.0
path: .spaces[1].metrics.loc.cloc
old: 1.0
new: 18.0
path: .spaces[1].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[1].metrics.loc.sloc
old: 30.0
new: 56.0
path: .spaces[1].metrics.nargs.average
old: 0.0
new: null
Code
namespace mozilla {
namespace widget {
/*
* Holds the logic for creating WindowSurface's for a GTK nsWindow.
* The main purpose of this class is to allow sharing of logic between
* nsWindow and GtkCompositorWidget, for when OMTC is enabled or disabled.
*/
class WindowSurfaceProvider final {
public:
WindowSurfaceProvider();
/**
* Initializes the WindowSurfaceProvider by giving it the window
* handle and display to attach to. WindowSurfaceProvider doesn't
* own the Display, Window, etc, and they must continue to exist
* while WindowSurfaceProvider is used.
*/
void Initialize(Display* aDisplay, Window aWindow, Visual* aVisual,
int aDepth, bool aIsShaped);
#ifdef MOZ_WAYLAND
void Initialize(nsWindow* aWidget);
#endif
/**
* Releases any surfaces created by this provider.
* This is used by GtkCompositorWidget to get rid
* of resources before we close the display connection.
*/
void CleanupResources();
already_AddRefed StartRemoteDrawingInRegion(
const LayoutDeviceIntRegion& aInvalidRegion,
layers::BufferMode* aBufferMode);
void EndRemoteDrawingInRegion(gfx::DrawTarget* aDrawTarget,
const LayoutDeviceIntRegion& aInvalidRegion);
private:
UniquePtr CreateWindowSurface();
// Can we access X?
bool mIsX11Display;
Display* mXDisplay;
Window mXWindow;
Visual* mXVisual;
int mXDepth;
UniquePtr mWindowSurface;
#ifdef MOZ_WAYLAND
nsWindow* mWidget;
#endif
bool mIsShaped;
};
} // namespace widget
} // namespace mozilla
Minimal test - lines (26, 79)
path: .spaces[1].spaces[0].metrics.nargs.average
old: 0.0
new: null
path: .spaces[1].spaces[0].metrics.loc.sloc
old: 1.0
new: 54.0
path: .spaces[1].spaces[0].metrics.loc.ploc
old: 1.0
new: 29.0
path: .spaces[1].spaces[0].metrics.loc.cloc
old: 0.0
new: 17.0
path: .spaces[1].spaces[0].metrics.loc.lloc
old: 1.0
new: 0.0
path: .spaces[1].spaces[0].metrics.loc.blank
old: 0.0
new: 8.0
path: .spaces[1].spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[1].spaces[0].metrics.nexits.sum
old: 1.0
new: 0.0
path: .spaces[1].spaces[0].metrics.nom.total
old: 1.0
new: 0.0
path: .spaces[1].spaces[0].metrics.nom.functions
old: 1.0
new: 0.0
path: .spaces[1].spaces[0].metrics.mi.mi_original
old: 153.34515096830847
new: 72.68445680740435
path: .spaces[1].spaces[0].metrics.mi.mi_sei
old: 145.63125671373976
new: 67.55580559464363
path: .spaces[1].spaces[0].metrics.mi.mi_visual_studio
old: 89.67552688205174
new: 42.50553029672769
path: .spaces[1].spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[1].spaces[0].metrics.halstead.level
old: 0.3333333333333333
new: 0.13539651837524178
path: .spaces[1].spaces[0].metrics.halstead.n1
old: 6.0
new: 11.0
path: .spaces[1].spaces[0].metrics.halstead.N2
old: 3.0
new: 47.0
path: .spaces[1].spaces[0].metrics.halstead.N1
old: 6.0
new: 61.0
path: .spaces[1].spaces[0].metrics.halstead.effort
old: 85.58797503894243
new: 4405.908648262849
path: .spaces[1].spaces[0].metrics.halstead.length
old: 9.0
new: 108.0
path: .spaces[1].spaces[0].metrics.halstead.n2
old: 3.0
new: 35.0
path: .spaces[1].spaces[0].metrics.halstead.purity_ratio
old: 2.2516291673878226
new: 2.014617161093371
path: .spaces[1].spaces[0].metrics.halstead.vocabulary
old: 9.0
new: 46.0
path: .spaces[1].spaces[0].metrics.halstead.difficulty
old: 3.0
new: 7.385714285714286
path: .spaces[1].spaces[0].metrics.halstead.bugs
old: 0.006473720020679235
new: 0.08958509064703908
path: .spaces[1].spaces[0].metrics.halstead.estimated_program_length
old: 20.264662506490403
new: 217.57865339808407
path: .spaces[1].spaces[0].metrics.halstead.volume
old: 28.52932501298081
new: 596.5446912541574
path: .spaces[1].spaces[0].metrics.halstead.time
old: 4.754887502163468
new: 244.77270268126935
path: .spaces[1].spaces[0].metrics.cognitive.average
old: 0.0
new: null
Code
namespace widget {
/*
* Holds the logic for creating WindowSurface's for a GTK nsWindow.
* The main purpose of this class is to allow sharing of logic between
* nsWindow and GtkCompositorWidget, for when OMTC is enabled or disabled.
*/
class WindowSurfaceProvider final {
public:
WindowSurfaceProvider();
/**
* Initializes the WindowSurfaceProvider by giving it the window
* handle and display to attach to. WindowSurfaceProvider doesn't
* own the Display, Window, etc, and they must continue to exist
* while WindowSurfaceProvider is used.
*/
void Initialize(Display* aDisplay, Window aWindow, Visual* aVisual,
int aDepth, bool aIsShaped);
#ifdef MOZ_WAYLAND
void Initialize(nsWindow* aWidget);
#endif
/**
* Releases any surfaces created by this provider.
* This is used by GtkCompositorWidget to get rid
* of resources before we close the display connection.
*/
void CleanupResources();
already_AddRefed StartRemoteDrawingInRegion(
const LayoutDeviceIntRegion& aInvalidRegion,
layers::BufferMode* aBufferMode);
void EndRemoteDrawingInRegion(gfx::DrawTarget* aDrawTarget,
const LayoutDeviceIntRegion& aInvalidRegion);
private:
UniquePtr CreateWindowSurface();
// Can we access X?
bool mIsX11Display;
Display* mXDisplay;
Window mXWindow;
Visual* mXVisual;
int mXDepth;
UniquePtr mWindowSurface;
#ifdef MOZ_WAYLAND
nsWindow* mWidget;
#endif
bool mIsShaped;
};
} // namespace widget
Minimal test - lines (23, 23)
path: .spaces[0].metrics.nom.functions
old: 5.0
new: 0.0
path: .spaces[0].metrics.nom.total
old: 5.0
new: 0.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: null
path: .spaces[0].metrics.nargs.average
old: 0.0
new: null
path: .spaces[0].metrics.nexits.average
old: 1.0
new: null
path: .spaces[0].metrics.nexits.sum
old: 5.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.sum
old: 15.0
new: 1.0
path: .spaces[0].metrics.loc.blank
old: 4.0
new: 0.0
path: .spaces[0].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[0].metrics.loc.lloc
old: 8.0
new: 0.0
path: .spaces[0].metrics.loc.ploc
old: 30.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 36.0
new: 1.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 44.55415821010607
new: null
path: .spaces[0].metrics.mi.mi_original
old: 76.18761053928138
new: null
path: .spaces[0].metrics.mi.mi_sei
old: 53.596328203753586
new: null
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.265387166891879
new: null
path: .spaces[0].metrics.halstead.time
old: 369.8782975552537
new: 0.0
path: .spaces[0].metrics.halstead.n1
old: 10.0
new: 0.0
path: .spaces[0].metrics.halstead.N2
old: 55.0
new: 1.0
path: .spaces[0].metrics.halstead.difficulty
old: 11.0
new: 0.0
path: .spaces[0].metrics.halstead.bugs
old: 0.11796857010353176
new: 0.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 149.31568569324173
new: null
path: .spaces[0].metrics.halstead.volume
old: 605.255395999506
new: 0.0
path: .spaces[0].metrics.halstead.N1
old: 63.0
new: 0.0
path: .spaces[0].metrics.halstead.length
old: 118.0
new: 1.0
path: .spaces[0].metrics.halstead.level
old: 0.09090909090909093
new: null
path: .spaces[0].metrics.halstead.effort
old: 6657.809355994566
new: 0.0
path: .spaces[0].metrics.halstead.n2
old: 25.0
new: 1.0
path: .spaces[0].metrics.halstead.vocabulary
old: 35.0
new: 1.0
Code
class nsWindow;