Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always return results in Mb/s #7

Merged
merged 3 commits into from
Feb 1, 2019
Merged

Always return results in Mb/s #7

merged 3 commits into from
Feb 1, 2019

Conversation

nkinkade
Copy link
Contributor

This PR aims to fix issue #6 in which speed result units may be incorrectly reported.

@nkinkade nkinkade requested a review from pboothe January 23, 2019 20:51
} else if (currentPhase == PHASE_DOWNLOAD) {
$scope.currentPhase = gettextCatalog.getString('Download');
$scope.currentSpeed = downloadSpeedVal ? getJustfiedSpeed(downloadSpeedVal) + ' ' + getSpeedUnit(downloadSpeedVal) : gettextCatalog.getString('Initializing');
$scope.currentSpeed = downloadSpeedVal ? getJustfiedSpeed(downloadSpeedVal) + ' Mb/s' : gettextCatalog.getString('Initializing');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getJustifiedSpeed() is the wrong thing to use if you want to fix units in Mb/s. I suggest rewriting it to always return the speed in Mb/s plus at most two decimal points.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pboothe: This should be fixed now. PTAL?

@pboothe
Copy link

pboothe commented Feb 1, 2019

Please also delete the functions getJustifiedSpeed and getSpeedUnit. They are no longer used, so we should not leave them lying around.

LGTM

Copy link

@pboothe pboothe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you delete the two unused functions, feel free to merge without asking for another round of review.

@nkinkade nkinkade merged commit 8bcbd25 into master Feb 1, 2019
@robertodauria robertodauria deleted the fix-results-units branch March 1, 2021 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants