Closed Bug 1361480 Opened 3 years ago Closed 3 years ago

Improve algorithm of 'size' and 'transferred' filters

Categories

(DevTools :: Netmonitor, defect)

55 Branch
defect
Not set

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: sebo, Assigned: Honza)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

The algorithm round(log10(size)) used for the 'size' and 'transferred' filters seems to be unexpected.

It should be improved to filter requests having a size approximately matching the entered number.

For example, the request size could be checked whether it falls into size - size / 10 and size + size / 10, where "size" is the entered size.

Sebastian
Assignee: nobody → odvarko
Status: NEW → ASSIGNED
Comment on attachment 8864004 [details]
Bug 1361480 - Improve logic for size related filters;

https://reviewboard.mozilla.org/r/135728/#review139074

::: devtools/client/netmonitor/src/utils/filter-text-utils.js:216
(Diff revision 1)
>    }
>    return match;
>  }
>  
> +function isSizeMatch(value, size) {
> +  return value > (size - size / 10) && value < (size + size / 10);

That seems change the current behavior though, but looks reasonable. 

nit: we should use `>=` to include the exact number that user specified.
Attachment #8864004 - Flags: review?(gasolin) → review+
Comment on attachment 8864004 [details]
Bug 1361480 - Improve logic for size related filters;

https://reviewboard.mozilla.org/r/135728/#review139074

> That seems change the current behavior though, but looks reasonable. 
> 
> nit: we should use `>=` to include the exact number that user specified.

Fixed
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/579a36c00c58
Improve logic for size related filters; r=gasolin
https://hg.mozilla.org/mozilla-central/rev/579a36c00c58
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.