Bug 1294490 - Part 4. Implement telemetry for WebP decoder. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D8117
This commit is contained in:
Andrew Osmond 2018-10-03 17:40:41 -04:00
parent 4c9b7d3ad8
commit a4554fb9cf
3 changed files with 18 additions and 0 deletions

View File

@ -547,5 +547,11 @@ nsWebPDecoder::ReadMultiple(WebPDemuxer* aDemuxer, bool aIsComplete)
return rv;
}
Maybe<Telemetry::HistogramID>
nsWebPDecoder::SpeedHistogram() const
{
return Some(Telemetry::IMAGE_DECODE_SPEED_WEBP);
}
} // namespace image
} // namespace mozilla

View File

@ -24,6 +24,7 @@ public:
protected:
LexerResult DoDecode(SourceBufferIterator& aIterator,
IResumable* aOnResume) override;
Maybe<Telemetry::HistogramID> SpeedHistogram() const override;
private:
friend class DecoderFactory;

View File

@ -1351,6 +1351,17 @@
"n_buckets": 50,
"description": "PNG image decode speed (Kbytes/sec)"
},
"IMAGE_DECODE_SPEED_WEBP": {
"record_in_processes": ["main", "content"],
"alert_emails": ["gfx-telemetry-alerts@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
"low": 500,
"high": 50000000,
"n_buckets": 50,
"description": "WebP image decode speed (Kbytes/sec)",
"bug_numbers": [1294490]
},
"IMAGE_REQUEST_DISPATCHED": {
"record_in_processes": ["main", "content"],
"alert_emails": ["gfx-telemetry-alerts@mozilla.com","aosmond@mozilla.com"],