Bug 846215 - separate content and chrome word cache metrics. r=taras

This commit is contained in:
John Daggett 2013-03-04 15:57:08 +09:00
parent c0b65e4a8f
commit bdf8f19da2
2 changed files with 24 additions and 6 deletions

View File

@ -2449,13 +2449,19 @@ gfxFont::GetShapedWord(gfxContext *aContext,
}
gfxShapedWord *sw = entry->mShapedWord;
bool isContent = !mStyle.systemFont;
if (sw) {
sw->ResetAge();
Telemetry::Accumulate(Telemetry::WORD_CACHE_HITS, aLength);
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_HITS_CONTENT :
Telemetry::WORD_CACHE_HITS_CHROME),
aLength);
return sw;
}
Telemetry::Accumulate(Telemetry::WORD_CACHE_MISSES, aLength);
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_MISSES_CONTENT :
Telemetry::WORD_CACHE_MISSES_CHROME),
aLength);
sw = entry->mShapedWord = gfxShapedWord::Create(aText, aLength,
aRunScript,
aAppUnitsPerDevUnit,

View File

@ -485,17 +485,29 @@
"kind": "flag",
"description": "Was the disk startup cache file detected as invalid"
},
"WORD_CACHE_HITS": {
"WORD_CACHE_HITS_CONTENT": {
"kind": "exponential",
"high": "256",
"n_buckets": 30,
"description": "Word cache hits (chars)"
"description": "Word cache hits, content text (chars)"
},
"WORD_CACHE_MISSES": {
"WORD_CACHE_HITS_CHROME": {
"kind": "exponential",
"high": "256",
"n_buckets": 30,
"description": "Word cache misses (chars)"
"description": "Word cache hits, chrome text (chars)"
},
"WORD_CACHE_MISSES_CONTENT": {
"kind": "exponential",
"high": "256",
"n_buckets": 30,
"description": "Word cache misses, content text (chars)"
},
"WORD_CACHE_MISSES_CHROME": {
"kind": "exponential",
"high": "256",
"n_buckets": 30,
"description": "Word cache misses, chrome text (chars)"
},
"FONT_CACHE_HIT": {
"kind": "boolean",