Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContents.cpp

Issue 2533783003: Add metrics for style update time before FCP. (Closed)
Patch Set: value_or(base::TimeDelta()) Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSTiming.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 19742315641621c426910665c00411a7018ffd8c..7cb1d56951c43259e1d41bdc00e45aa2820942b9 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -328,7 +328,7 @@ void StyleSheetContents::parseAuthorStyleSheet(
const SecurityOrigin* securityOrigin) {
TRACE_EVENT1("blink,devtools.timeline", "ParseAuthorStyleSheet", "data",
InspectorParseAuthorStyleSheetEvent::data(cachedStyleSheet));
- double startTimeMS = monotonicallyIncreasingTimeMS();
+ double startTime = monotonicallyIncreasingTime();
bool isSameOriginRequest =
securityOrigin && securityOrigin->canRequest(baseURL());
@@ -364,12 +364,11 @@ void StyleSheetContents::parseAuthorStyleSheet(
DEFINE_STATIC_LOCAL(CustomCountHistogram, parseHistogram,
("Style.AuthorStyleSheet.ParseTime", 0, 10000000, 50));
- double parseDurationMS = (monotonicallyIncreasingTimeMS() - startTimeMS);
- parseHistogram.count(parseDurationMS * 1000);
+ double parseDurationSeconds = (monotonicallyIncreasingTime() - startTime);
+ parseHistogram.count(parseDurationSeconds * 1000 * 1000);
if (Document* document = singleOwnerDocument()) {
- // CSSTiming expects time in seconds.
- CSSTiming::from(*document).recordAuthorStyleSheetParseTime(parseDurationMS /
- 1000);
+ CSSTiming::from(*document).recordAuthorStyleSheetParseTime(
+ parseDurationSeconds);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSTiming.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698