Closed GoogleCodeExporter closed 9 years ago
This code fragment looked like this some time ago, so there was a small
difference between IF and ELSE branches:
if ((tests & TEST_C2S) == TEST_C2S) {
if (c2sspd > sc2sspd) {
if (sc2sspd < (c2sspd * (1.0 - VIEW_DIFF))) {
statistics.append("C2S throughput test: Excessive packet queuing detected: " + prtdbl(100 * (c2sspd - sc2sspd) / c2sspd) + "%\n");
}
else {
statistics.append("C2S throughput test: Packet queuing detected: " + prtdbl(100 * (c2sspd - sc2sspd) / c2sspd) + "%\n");
}
}
}
Original comment by jslawin...@soldevelo.com
on 21 Nov 2013 at 12:37
Thanks for the quick answer!
What's the preferred way to fix this?
1) Re-introduce the distinction,
2) Eliminate the ELSE branch, OR
3) Eliminate the check -- IMO, this is the least likely, by looking at the rest
of the code.
Original comment by tizi...@google.com
on 21 Nov 2013 at 3:08
I think the first way is the best. The idea around this distinction was to
highlight the excessive packet queueing (i.e. more 10% of the packets were
queued) and I do not see any reason why we shouldn't highlight this fact to the
end user.
Original comment by jslawin...@soldevelo.com
on 21 Nov 2013 at 3:35
I concur that it's better to highlight the excessiveness.
Original comment by AaronMat...@gmail.com
on 26 Nov 2013 at 1:08
Original comment by jslawin...@soldevelo.com
on 28 Nov 2013 at 8:58
Original comment by smale...@soldevelo.com
on 17 Feb 2014 at 10:37
Changes available on branch applet_98. Feel free to review.
Original comment by smale...@soldevelo.com
on 17 Feb 2014 at 1:03
Original comment by smale...@soldevelo.com
on 4 Mar 2014 at 8:45
Original comment by skost...@soldevelo.com
on 23 Jun 2014 at 5:49
Original issue reported on code.google.com by
tizi...@google.com
on 21 Nov 2013 at 12:23