Global Metrics
path: .metrics.halstead.effort
old: 3646.051901902172
new: 128668.76541423454
path: .metrics.halstead.length
old: 81.0
new: 555.0
path: .metrics.halstead.time
old: 202.5584389945651
new: 7148.264745235252
path: .metrics.halstead.n1
old: 11.0
new: 24.0
path: .metrics.halstead.estimated_program_length
old: 142.09567279432156
new: 584.8815910390202
path: .metrics.halstead.N1
old: 44.0
new: 334.0
path: .metrics.halstead.volume
old: 412.08449014127746
new: 3687.340185324972
path: .metrics.halstead.bugs
old: 0.07896366723743188
new: 0.8495602183670723
path: .metrics.halstead.purity_ratio
old: 1.7542675653619946
new: 1.0538407045748113
path: .metrics.halstead.vocabulary
old: 34.0
new: 100.0
path: .metrics.halstead.n2
old: 23.0
new: 76.0
path: .metrics.halstead.level
old: 0.11302211302211304
new: 0.028657616892911013
path: .metrics.halstead.N2
old: 37.0
new: 221.0
path: .metrics.halstead.difficulty
old: 8.847826086956522
new: 34.89473684210526
path: .metrics.mi.mi_visual_studio
old: 43.3154760650687
new: 21.256553852490303
path: .metrics.mi.mi_sei
old: 70.59213525032614
new: 3.336139107727071
path: .metrics.mi.mi_original
old: 74.06946407126748
new: 36.34870708775843
path: .metrics.nom.functions
old: 0.0
new: 17.0
path: .metrics.nom.total
old: 0.0
new: 17.0
path: .metrics.cyclomatic.average
old: 1.0
new: 1.4736842105263157
path: .metrics.cyclomatic.sum
old: 7.0
new: 28.0
path: .metrics.cognitive.sum
old: 0.0
new: 10.0
path: .metrics.cognitive.average
old: null
new: 0.5882352941176471
path: .metrics.nexits.sum
old: 0.0
new: 3.0
path: .metrics.nexits.average
old: null
new: 0.17647058823529413
path: .metrics.nargs.average
old: null
new: 0.6470588235294118
path: .metrics.nargs.sum
old: 0.0
new: 11.0
path: .metrics.loc.lloc
old: 0.0
new: 57.0
path: .metrics.loc.cloc
old: 17.0
new: 20.0
path: .metrics.loc.ploc
old: 25.0
new: 149.0
path: .metrics.loc.sloc
old: 52.0
new: 196.0
path: .metrics.loc.blank
old: 10.0
new: 27.0
Spaces Data
Minimal test - lines (28, 37)
path: .spaces[0].spaces[1].metrics.mi.mi_sei
old: null
new: 77.95795076727602
path: .spaces[0].spaces[1].metrics.mi.mi_original
old: null
new: 106.43758975234654
path: .spaces[0].spaces[1].metrics.mi.mi_visual_studio
old: null
new: 62.244204533535985
path: .spaces[0].spaces[1].metrics.halstead.effort
old: 0.0
new: 988.7213989667472
path: .spaces[0].spaces[1].metrics.halstead.vocabulary
old: 1.0
new: 23.0
path: .spaces[0].spaces[1].metrics.halstead.N1
old: 0.0
new: 23.0
path: .spaces[0].spaces[1].metrics.halstead.level
old: null
new: 0.1830065359477124
path: .spaces[0].spaces[1].metrics.halstead.volume
old: 0.0
new: 180.94247824228052
path: .spaces[0].spaces[1].metrics.halstead.n1
old: 0.0
new: 9.0
path: .spaces[0].spaces[1].metrics.halstead.bugs
old: 0.0
new: 0.03308222424104067
path: .spaces[0].spaces[1].metrics.halstead.n2
old: 1.0
new: 14.0
path: .spaces[0].spaces[1].metrics.halstead.N2
old: 1.0
new: 17.0
path: .spaces[0].spaces[1].metrics.halstead.length
old: 1.0
new: 40.0
path: .spaces[0].spaces[1].metrics.halstead.purity_ratio
old: null
new: 2.045807348044682
path: .spaces[0].spaces[1].metrics.halstead.difficulty
old: 0.0
new: 5.464285714285714
path: .spaces[0].spaces[1].metrics.halstead.time
old: 0.0
new: 54.928966609263725
path: .spaces[0].spaces[1].metrics.halstead.estimated_program_length
old: null
new: 81.83229392178727
path: .spaces[0].spaces[1].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[1].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].spaces[1].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[1].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[1].metrics.loc.sloc
old: 1.0
new: 10.0
path: .spaces[0].spaces[1].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].spaces[1].metrics.loc.ploc
old: 1.0
new: 9.0
path: .spaces[0].spaces[1].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[1].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[1].metrics.nom.total
old: 0.0
new: 1.0
Code
CompositorVsyncDispatcher::CompositorVsyncDispatcher(
RefPtr aVsyncSource)
: mVsyncSource(std::move(aVsyncSource)),
mCompositorObserverLock("CompositorObserverLock"),
mDidShutdown(false) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
mVsyncSource->RegisterCompositorVsyncDispatcher(this);
}
Minimal test - lines (16, 196)
path: .spaces[0].metrics.nargs.average
old: null
new: 0.6470588235294118
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 11.0
path: .spaces[0].metrics.loc.ploc
old: 19.0
new: 141.0
path: .spaces[0].metrics.loc.cloc
old: 11.0
new: 15.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 57.0
path: .spaces[0].metrics.loc.sloc
old: 38.0
new: 181.0
path: .spaces[0].metrics.loc.blank
old: 8.0
new: 25.0
path: .spaces[0].metrics.mi.mi_sei
old: 77.47130100421715
new: 3.5214336679630627
path: .spaces[0].metrics.mi.mi_visual_studio
old: 46.836682193916786
new: 22.25618430305324
path: .spaces[0].metrics.mi.mi_original
old: 80.0907265515977
new: 38.05807515822104
path: .spaces[0].metrics.nom.total
old: 0.0
new: 17.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 17.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 3.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.17647058823529413
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 10.0
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.5882352941176471
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 1.5
path: .spaces[0].metrics.cyclomatic.sum
old: 6.0
new: 27.0
path: .spaces[0].metrics.halstead.N2
old: 32.0
new: 213.0
path: .spaces[0].metrics.halstead.bugs
old: 0.06975596544769526
new: 0.87129970211394
path: .spaces[0].metrics.halstead.difficulty
old: 8.421052631578947
new: 37.588235294117645
path: .spaces[0].metrics.halstead.N1
old: 42.0
new: 332.0
path: .spaces[0].metrics.halstead.vocabulary
old: 29.0
new: 92.0
path: .spaces[0].metrics.halstead.effort
old: 3027.2892095952866
new: 133639.00405921382
path: .spaces[0].metrics.halstead.time
old: 168.18273386640482
new: 7424.389114400768
path: .spaces[0].metrics.halstead.estimated_program_length
old: 113.92990370430176
new: 523.9865732223308
path: .spaces[0].metrics.halstead.length
old: 74.0
new: 545.0
path: .spaces[0].metrics.halstead.volume
old: 359.4905936394403
new: 3555.341266051072
path: .spaces[0].metrics.halstead.n1
old: 10.0
new: 24.0
path: .spaces[0].metrics.halstead.n2
old: 19.0
new: 68.0
path: .spaces[0].metrics.halstead.level
old: 0.11875
new: 0.026604068857589987
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.539593293301375
new: 0.9614432536189556
Code
namespace mozilla {
CompositorVsyncDispatcher::CompositorVsyncDispatcher()
: mVsyncSource(gfxPlatform::GetPlatform()->GetHardwareVsync()),
mCompositorObserverLock("CompositorObserverLock"),
mDidShutdown(false) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
mVsyncSource->RegisterCompositorVsyncDispatcher(this);
}
CompositorVsyncDispatcher::CompositorVsyncDispatcher(
RefPtr aVsyncSource)
: mVsyncSource(std::move(aVsyncSource)),
mCompositorObserverLock("CompositorObserverLock"),
mDidShutdown(false) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
mVsyncSource->RegisterCompositorVsyncDispatcher(this);
}
CompositorVsyncDispatcher::~CompositorVsyncDispatcher() {
MOZ_ASSERT(XRE_IsParentProcess());
// We auto remove this vsync dispatcher from the vsync source in the
// nsBaseWidget
}
void CompositorVsyncDispatcher::NotifyVsync(const VsyncEvent& aVsync) {
// In vsync thread
layers::CompositorBridgeParent::PostInsertVsyncProfilerMarker(aVsync.mTime);
MutexAutoLock lock(mCompositorObserverLock);
if (mCompositorVsyncObserver) {
mCompositorVsyncObserver->NotifyVsync(aVsync);
}
}
void CompositorVsyncDispatcher::MoveToSource(
const RefPtr& aVsyncSource) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(XRE_IsParentProcess());
mVsyncSource = aVsyncSource;
}
void CompositorVsyncDispatcher::ObserveVsync(bool aEnable) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(XRE_IsParentProcess());
if (mDidShutdown) {
return;
}
if (aEnable) {
mVsyncSource->EnableCompositorVsyncDispatcher(this);
} else {
mVsyncSource->DisableCompositorVsyncDispatcher(this);
}
}
void CompositorVsyncDispatcher::SetCompositorVsyncObserver(
VsyncObserver* aVsyncObserver) {
// When remote compositing or running gtests, vsync observation is
// initiated on the main thread. Otherwise, it is initiated from the
// compositor thread.
MOZ_ASSERT(NS_IsMainThread() ||
CompositorThreadHolder::IsInCompositorThread());
{ // scope lock
MutexAutoLock lock(mCompositorObserverLock);
mCompositorVsyncObserver = aVsyncObserver;
}
bool observeVsync = aVsyncObserver != nullptr;
nsCOMPtr vsyncControl = NewRunnableMethod(
"CompositorVsyncDispatcher::ObserveVsync", this,
&CompositorVsyncDispatcher::ObserveVsync, observeVsync);
NS_DispatchToMainThread(vsyncControl);
}
void CompositorVsyncDispatcher::Shutdown() {
// Need to explicitly remove CompositorVsyncDispatcher when the nsBaseWidget
// shuts down. Otherwise, we would get dead vsync notifications between when
// the nsBaseWidget shuts down and the CompositorBridgeParent shuts down.
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!mDidShutdown);
ObserveVsync(false);
mDidShutdown = true;
{ // scope lock
MutexAutoLock lock(mCompositorObserverLock);
mCompositorVsyncObserver = nullptr;
}
mVsyncSource->DeregisterCompositorVsyncDispatcher(this);
mVsyncSource = nullptr;
}
RefreshTimerVsyncDispatcher::RefreshTimerVsyncDispatcher(
gfx::VsyncSource::Display* aDisplay)
: mDisplay(aDisplay), mRefreshTimersLock("RefreshTimers lock") {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
}
RefreshTimerVsyncDispatcher::~RefreshTimerVsyncDispatcher() {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
}
void RefreshTimerVsyncDispatcher::MoveToDisplay(
gfx::VsyncSource::Display* aDisplay) {
MOZ_ASSERT(NS_IsMainThread());
mDisplay = aDisplay;
}
void RefreshTimerVsyncDispatcher::NotifyVsync(const VsyncEvent& aVsync) {
MutexAutoLock lock(mRefreshTimersLock);
for (size_t i = 0; i < mChildRefreshTimers.Length(); i++) {
mChildRefreshTimers[i]->NotifyVsync(aVsync);
}
if (mParentRefreshTimer) {
mParentRefreshTimer->NotifyVsync(aVsync);
}
}
void RefreshTimerVsyncDispatcher::SetParentRefreshTimer(
VsyncObserver* aVsyncObserver) {
MOZ_ASSERT(NS_IsMainThread());
{ // lock scope because UpdateVsyncStatus runs on main thread and will
// deadlock
MutexAutoLock lock(mRefreshTimersLock);
mParentRefreshTimer = aVsyncObserver;
}
UpdateVsyncStatus();
}
void RefreshTimerVsyncDispatcher::AddChildRefreshTimer(
VsyncObserver* aVsyncObserver) {
{ // scope lock - called on pbackground thread
MutexAutoLock lock(mRefreshTimersLock);
MOZ_ASSERT(aVsyncObserver);
if (!mChildRefreshTimers.Contains(aVsyncObserver)) {
mChildRefreshTimers.AppendElement(aVsyncObserver);
}
}
UpdateVsyncStatus();
}
void RefreshTimerVsyncDispatcher::RemoveChildRefreshTimer(
VsyncObserver* aVsyncObserver) {
{ // scope lock - called on pbackground thread
MutexAutoLock lock(mRefreshTimersLock);
MOZ_ASSERT(aVsyncObserver);
mChildRefreshTimers.RemoveElement(aVsyncObserver);
}
UpdateVsyncStatus();
}
void RefreshTimerVsyncDispatcher::UpdateVsyncStatus() {
if (!NS_IsMainThread()) {
NS_DispatchToMainThread(NewRunnableMethod(
"RefreshTimerVsyncDispatcher::UpdateVsyncStatus", this,
&RefreshTimerVsyncDispatcher::UpdateVsyncStatus));
return;
}
mDisplay->NotifyRefreshTimerVsyncStatus(NeedsVsync());
}
bool RefreshTimerVsyncDispatcher::NeedsVsync() {
MOZ_ASSERT(NS_IsMainThread());
MutexAutoLock lock(mRefreshTimersLock);
return (mParentRefreshTimer != nullptr) || !mChildRefreshTimers.IsEmpty();
}
} // namespace mozilla
Minimal test - lines (39, 43)
path: .spaces[0].spaces[2].metrics.halstead.difficulty
old: 0.0
new: 2.5
path: .spaces[0].spaces[2].metrics.halstead.vocabulary
old: 1.0
new: 8.0
path: .spaces[0].spaces[2].metrics.halstead.N2
old: 1.0
new: 3.0
path: .spaces[0].spaces[2].metrics.halstead.effort
old: 0.0
new: 75.0
path: .spaces[0].spaces[2].metrics.halstead.estimated_program_length
old: null
new: 16.36452797660028
path: .spaces[0].spaces[2].metrics.halstead.level
old: null
new: 0.4
path: .spaces[0].spaces[2].metrics.halstead.length
old: 1.0
new: 10.0
path: .spaces[0].spaces[2].metrics.halstead.volume
old: 0.0
new: 30.0
path: .spaces[0].spaces[2].metrics.halstead.N1
old: 0.0
new: 7.0
path: .spaces[0].spaces[2].metrics.halstead.purity_ratio
old: null
new: 1.6364527976600278
path: .spaces[0].spaces[2].metrics.halstead.n2
old: 1.0
new: 3.0
path: .spaces[0].spaces[2].metrics.halstead.time
old: 0.0
new: 4.166666666666667
path: .spaces[0].spaces[2].metrics.halstead.bugs
old: 0.0
new: 0.005928155507483437
path: .spaces[0].spaces[2].metrics.halstead.n1
old: 0.0
new: 5.0
path: .spaces[0].spaces[2].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[2].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[2].metrics.nargs.average
old: null
new: 0.0
path: .spaces[0].spaces[2].metrics.loc.sloc
old: 1.0
new: 5.0
path: .spaces[0].spaces[2].metrics.loc.lloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[2].metrics.loc.ploc
old: 1.0
new: 3.0
path: .spaces[0].spaces[2].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[0].spaces[2].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[2].metrics.mi.mi_original
old: null
new: 127.01087943392436
path: .spaces[0].spaces[2].metrics.mi.mi_sei
old: null
new: 149.1581169298888
path: .spaces[0].spaces[2].metrics.mi.mi_visual_studio
old: null
new: 74.27536809001425
path: .spaces[0].spaces[2].metrics.cognitive.average
old: null
new: 0.0
Code
CompositorVsyncDispatcher::~CompositorVsyncDispatcher() {
MOZ_ASSERT(XRE_IsParentProcess());
// We auto remove this vsync dispatcher from the vsync source in the
// nsBaseWidget
}
Minimal test - lines (18, 26)
path: .spaces[0].spaces[0].metrics.loc.sloc
old: 1.0
new: 9.0
path: .spaces[0].spaces[0].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[0].metrics.loc.ploc
old: 1.0
new: 8.0
path: .spaces[0].spaces[0].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].metrics.mi.mi_original
old: null
new: 109.019221022642
path: .spaces[0].spaces[0].metrics.mi.mi_sei
old: null
new: 81.68245739833516
path: .spaces[0].spaces[0].metrics.mi.mi_visual_studio
old: null
new: 63.75393042259767
path: .spaces[0].spaces[0].metrics.halstead.volume
old: 0.0
new: 152.92539048396907
path: .spaces[0].spaces[0].metrics.halstead.time
old: 0.0
new: 34.691408026455946
path: .spaces[0].spaces[0].metrics.halstead.N1
old: 0.0
new: 22.0
path: .spaces[0].spaces[0].metrics.halstead.N2
old: 1.0
new: 14.0
path: .spaces[0].spaces[0].metrics.halstead.n1
old: 0.0
new: 7.0
path: .spaces[0].spaces[0].metrics.halstead.level
old: null
new: 0.2448979591836735
path: .spaces[0].spaces[0].metrics.halstead.vocabulary
old: 1.0
new: 19.0
path: .spaces[0].spaces[0].metrics.halstead.n2
old: 1.0
new: 12.0
path: .spaces[0].spaces[0].metrics.halstead.estimated_program_length
old: null
new: 62.6710344630571
path: .spaces[0].spaces[0].metrics.halstead.bugs
old: 0.0
new: 0.024352396151190826
path: .spaces[0].spaces[0].metrics.halstead.length
old: 1.0
new: 36.0
path: .spaces[0].spaces[0].metrics.halstead.effort
old: 0.0
new: 624.445344476207
path: .spaces[0].spaces[0].metrics.halstead.purity_ratio
old: null
new: 1.7408620684182528
path: .spaces[0].spaces[0].metrics.halstead.difficulty
old: 0.0
new: 4.083333333333333
path: .spaces[0].spaces[0].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[0].metrics.nargs.average
old: null
new: 0.0
path: .spaces[0].spaces[0].metrics.cognitive.average
old: null
new: 0.0
Code
CompositorVsyncDispatcher::CompositorVsyncDispatcher()
: mVsyncSource(gfxPlatform::GetPlatform()->GetHardwareVsync()),
mCompositorObserverLock("CompositorObserverLock"),
mDidShutdown(false) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
mVsyncSource->RegisterCompositorVsyncDispatcher(this);
}
Minimal test - lines (45, 53)
path: .spaces[0].spaces[3].metrics.halstead.time
old: 0.0
new: 46.67999376614589
path: .spaces[0].spaces[3].metrics.halstead.difficulty
old: 0.0
new: 6.5
path: .spaces[0].spaces[3].metrics.halstead.volume
old: 0.0
new: 129.26767504471167
path: .spaces[0].spaces[3].metrics.halstead.bugs
old: 0.0
new: 0.029681164890027513
path: .spaces[0].spaces[3].metrics.halstead.estimated_program_length
old: null
new: 57.05865002596162
path: .spaces[0].spaces[3].metrics.halstead.effort
old: 0.0
new: 840.2398877906259
path: .spaces[0].spaces[3].metrics.halstead.purity_ratio
old: null
new: 1.8406016137406973
path: .spaces[0].spaces[3].metrics.halstead.n2
old: 1.0
new: 9.0
path: .spaces[0].spaces[3].metrics.halstead.N2
old: 1.0
new: 13.0
path: .spaces[0].spaces[3].metrics.halstead.length
old: 1.0
new: 31.0
path: .spaces[0].spaces[3].metrics.halstead.N1
old: 0.0
new: 18.0
path: .spaces[0].spaces[3].metrics.halstead.n1
old: 0.0
new: 9.0
path: .spaces[0].spaces[3].metrics.halstead.vocabulary
old: 1.0
new: 18.0
path: .spaces[0].spaces[3].metrics.halstead.level
old: null
new: 0.15384615384615383
path: .spaces[0].spaces[3].metrics.mi.mi_sei
old: null
new: 107.4008249348274
path: .spaces[0].spaces[3].metrics.mi.mi_original
old: null
new: 109.6631585218371
path: .spaces[0].spaces[3].metrics.mi.mi_visual_studio
old: null
new: 64.13050205955386
path: .spaces[0].spaces[3].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[3].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[0].spaces[3].metrics.loc.sloc
old: 1.0
new: 9.0
path: .spaces[0].spaces[3].metrics.loc.ploc
old: 1.0
new: 7.0
path: .spaces[0].spaces[3].metrics.loc.cloc
old: 0.0
new: 1.0
path: .spaces[0].spaces[3].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[3].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[3].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[3].metrics.cyclomatic.sum
old: 1.0
new: 2.0
path: .spaces[0].spaces[3].metrics.cyclomatic.average
old: 1.0
new: 2.0
path: .spaces[0].spaces[3].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].spaces[3].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[3].metrics.cognitive.average
old: null
new: 1.0
path: .spaces[0].spaces[3].metrics.cognitive.sum
old: 0.0
new: 1.0
Code
void CompositorVsyncDispatcher::NotifyVsync(const VsyncEvent& aVsync) {
// In vsync thread
layers::CompositorBridgeParent::PostInsertVsyncProfilerMarker(aVsync.mTime);
MutexAutoLock lock(mCompositorObserverLock);
if (mCompositorVsyncObserver) {
mCompositorVsyncObserver->NotifyVsync(aVsync);
}
}
Minimal test - lines (55, 60)
path: .spaces[0].spaces[4].metrics.mi.mi_visual_studio
old: 50.923521550159535
new: 68.70186402628089
path: .spaces[0].spaces[4].metrics.mi.mi_original
old: 87.07922185077281
new: 117.4801874849403
path: .spaces[0].spaces[4].metrics.mi.mi_sei
old: 89.98543234568085
new: 93.88905175462077
path: .spaces[0].spaces[4].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].spaces[4].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].spaces[4].metrics.nexits.average
old: null
new: 0.0
path: .spaces[0].spaces[4].metrics.loc.ploc
old: 13.0
new: 6.0
path: .spaces[0].spaces[4].metrics.loc.blank
old: 5.0
new: 0.0
path: .spaces[0].spaces[4].metrics.loc.lloc
old: 0.0
new: 3.0
path: .spaces[0].spaces[4].metrics.loc.sloc
old: 28.0
new: 6.0
path: .spaces[0].spaces[4].metrics.loc.cloc
old: 10.0
new: 0.0
path: .spaces[0].spaces[4].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].spaces[4].metrics.nargs.average
old: null
new: 1.0
path: .spaces[0].spaces[4].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[0].spaces[4].metrics.halstead.effort
old: 2271.475200672218
new: 597.7914405328621
path: .spaces[0].spaces[4].metrics.halstead.N2
old: 27.0
new: 10.0
path: .spaces[0].spaces[4].metrics.halstead.difficulty
old: 7.5
new: 5.625
path: .spaces[0].spaces[4].metrics.halstead.vocabulary
old: 28.0
new: 17.0
path: .spaces[0].spaces[4].metrics.halstead.level
old: 0.13333333333333333
new: 0.17777777777777778
path: .spaces[0].spaces[4].metrics.halstead.length
old: 63.0
new: 26.0
path: .spaces[0].spaces[4].metrics.halstead.n2
old: 18.0
new: 8.0
path: .spaces[0].spaces[4].metrics.halstead.bugs
old: 0.05759932735055926
new: 0.023654396566148563
path: .spaces[0].spaces[4].metrics.halstead.purity_ratio
old: 1.7186973170608768
new: 2.0203586543454155
path: .spaces[0].spaces[4].metrics.halstead.estimated_program_length
old: 108.27793097483524
new: 52.529325012980806
path: .spaces[0].spaces[4].metrics.halstead.n1
old: 10.0
new: 9.0
path: .spaces[0].spaces[4].metrics.halstead.volume
old: 302.86336008962905
new: 106.27403387250882
path: .spaces[0].spaces[4].metrics.halstead.time
old: 126.1930667040121
new: 33.210635585159004
path: .spaces[0].spaces[4].metrics.halstead.N1
old: 36.0
new: 16.0
Code
void CompositorVsyncDispatcher::MoveToSource(
const RefPtr& aVsyncSource) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(XRE_IsParentProcess());
mVsyncSource = aVsyncSource;
}