Closed
Bug 1263945
Opened 8 years ago
Closed 8 years ago
Tell the exact number of bytes if below 1Kb
Categories
(DevTools :: Netmonitor, defect)
Tracking
(firefox49 fixed)
RESOLVED
FIXED
Firefox 49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: bruant.d, Assigned: gregtatum)
Details
Attachments
(2 files, 1 obsolete file)
357.79 KB,
image/png
|
Details | |
26.76 KB,
patch
|
Honza
:
review+
|
Details | Diff | Splinter Review |
The network monitor always provides the size of HTTP requests in Kb, but sometimes, the body is a few chars (for instance 2 chars for an empty JSON array "[]"). The network monitor then reports "0,00Kb". It's a correct approximation, but a useless information; much less useful than the actual number of byte to figure out whether the body actually has 0 chars or just a few of them. If the body is less than 1Kb, maybe the actual byte count would be more useful.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gtatum
Assignee | ||
Comment 1•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=aaab15f0cb41
Assignee | ||
Comment 2•8 years ago
|
||
This adds the functionality to both the size and transfer column.
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8745037 -
Flags: review?(odvarko)
Comment 4•8 years ago
|
||
Comment on attachment 8745037 [details] [diff] [review] Tell the exact number of bytes in network monitor if below 1Kb Review of attachment 8745037 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me! At some point we could also support MB and perhaps have a helper function like e.g. this one [1], but it's outside of scope of this bug. I am r- because there are test failures in the try push, for example: INFO TEST-UNEXPECTED-FAIL | devtools/client/netmonitor/test/browser_net_content-type.js | The displayed size is correct. - Got 42 B, expected 0.04 KB Theses need to be fixed. Honza [1] https://github.com/firebug/firebug/blob/master/extension/content/firebug/lib/string.js#L683
Attachment #8745037 -
Flags: review?(odvarko) → review-
Assignee | ||
Comment 5•8 years ago
|
||
Ok, I'll get this fixed. The memory tool also has a similar function. I wonder if we should put it in a shared folder. https://dxr.mozilla.org/mozilla-central/source/devtools/client/memory/utils.js#513-529
Comment 6•8 years ago
|
||
(In reply to Greg Tatum [:gregtatum] [@gregtatum] from comment #5) > The memory tool also has a similar function. I > wonder if we should put it in a shared folder. Yes, I support the idea (and it's ok for me if it's done as part of this bug). Honza
Assignee | ||
Comment 7•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecccd91d0fb8
Assignee | ||
Comment 8•8 years ago
|
||
Ok, I changed up this patch a little bit. I was looking into creating a generalized formatting function, but the memory tool does things a bit differently, so I didn't go that route. I went ahead and added support for some of the higher sizes. Now we have B, KB, MB, and GB. I also made the call to switch between them once numbers got to three digits. For instance instead of showing 1010.00 KB, I have it showing 0.98 MB instead, so that the formatting is a bit nicer in the columns. Also in that try run I have a broken eslint whitespace rule which I have fixed in this patch.
Attachment #8749651 -
Flags: review?(odvarko)
Assignee | ||
Updated•8 years ago
|
Attachment #8745037 -
Attachment is obsolete: true
Comment 9•8 years ago
|
||
Comment on attachment 8749651 [details] [diff] [review] Tell the exact number of bytes in network monitor if below 1Kb Review of attachment 8749651 [details] [diff] [review]: ----------------------------------------------------------------- Nice, looks good to me! One possible follow up could be improvement of the tooltip. It could show precise number of bytes (kbytes?) for those users who are interested in exact size. It currently shows the same number as displayed in the column and so, not that useful. Honza
Attachment #8749651 -
Flags: review?(odvarko) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 10•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/39fd1cdc461c
Keywords: checkin-needed
Comment 11•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/39fd1cdc461c
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Comment 12•8 years ago
|
||
I have reproduced this bug with Nightly 48.0a1 (2016-04-12) on Windows 7 , 64 Bit ! This bug's fix is verified with latest Beta ! Build ID 20160912134115 User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0 [bugday-20160914]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•