The default bug view has changed. See this FAQ.

Separate image decoding telemetry by decoder

RESOLVED FIXED in mozilla9

Status

()

Core
ImageLib
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: jrmuizel)

Tracking

unspecified
mozilla9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Bug 672207 adds image decoding telemetry, but it doesn't distinguish between how long different decoders take.

This is information is important if we want to set a different decode chunk size for different decoders.
(Assignee)

Comment 1

6 years ago
I've thought of a couple of different ways of doing this and haven't really decided on one yet:

1. have a virtual function on the decoder that returns a telemetry id
2. lookup a telemetry id based on the decoder type which I think we can get somehow
3. make the decoders responsible for recording their own telemetry.

Considerations: we probably care about telemetry for some decoders more than others. I'm not sure how much code duplication would happen if we made each decoder responsible for its own telemetry.
Virtual function on the decoder is best IMO. We can return a sentinel value if we don't want to track a particular decoder's time.
You currently can't tell what type of decoder you're using, FWIW, so #2 is a non-starter.
(Assignee)

Comment 4

6 years ago
Created attachment 558548 [details] [diff] [review]
Recording decoding speed for jpeg,png and gif
Attachment #558548 - Flags: review?(justin.lebar+bug)
(Reporter)

Comment 5

6 years ago
Comment on attachment 558548 [details] [diff] [review]
Recording decoding speed for jpeg,png and gif

> +    Telemetry::ID id = image->mDecoder->SpeedHistogram();
> +    if (id < Telemetry::HistogramCount) {
> +        Telemetry::Accumulate(image->mDecoder->SpeedHistogram(), PRInt32((image->mBytesDecoded/1024.0)/mDecodeTime.ToSeconds()));
> +    }

r=me, but please add a comment explaining why you have to check that id is valid, and please add some linebreaks to the Accumulate call.
Attachment #558548 - Flags: review?(justin.lebar+bug) → review+
https://hg.mozilla.org/mozilla-central/rev/a5273606afed
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.