Bug 148718 - download appears as 0MB
Summary: download appears as 0MB
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Haytham Yassine CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-06-26 15:44 EDT by Kim Moir CLA
Modified: 2006-09-09 22:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Moir CLA 2006-06-26 15:44:32 EDT
A couple of the downloads on the build pages appear as 0MB even though they are > 0.  This is because the php that calculates the download size rounds to the closest integer representation of the size in MB. In the case of the test-framework and releng tools, this is very small.  Perhaps decimal  sizes such as 0.4 MB should show up for download sizes when they are less than 1 MB.
Comment 1 Ron Baldwin CLA 2006-06-26 16:55:26 EDT
An alternate solution that I think would maximize the user experience would be to always show a minimum number of significant digits (say, 2).  So you would get sizes like:

    0.34 MB
    0.60 MB
    2.7 MB
    120 MB
Comment 2 Haytham Yassine CLA 2006-07-07 09:16:41 EDT
I implemented your 2 significant digits proposal and hopefully it will appear in the new downloads page once it is done. Therefore, 2 decimal places will appear for sizes between 0 and 1 MB, 1 decimal place for sizes between 1 and 10 MB, and no decimal places for sizes greater than or equal to 10 MB.


(In reply to comment #1)
> An alternate solution that I think would maximize the user experience would be
> to always show a minimum number of significant digits (say, 2).  So you would
> get sizes like:
>     0.34 MB
>     0.60 MB
>     2.7 MB
>     120 MB

Comment 3 Kim Moir CLA 2006-09-08 10:08:29 EDT
Haytham fixed this, implemented in HEAD for 3.3 builds.
Comment 4 Ron Baldwin CLA 2006-09-09 22:15:38 EDT
Minor bug:  sizes between 1 and 10 MB that are integers are dropping the ".0".  For example, what should be "2.0 MB" displays as "2 MB".