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

Unified Diff: Source/core/page/PerformanceUserTiming.cpp

Issue 23245004: Added UMA instrumentation for site-instrumented user timing marks and measures (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplified significantly and removed use tracking and lastMark UMAs Created 7 years, 4 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PerformanceUserTiming.cpp
diff --git a/Source/core/page/PerformanceUserTiming.cpp b/Source/core/page/PerformanceUserTiming.cpp
index a365c6ac690a94788184a0d83140b849057172ab..568fa357f521931876d7f9a2e6efbffa3cf33dcf 100644
--- a/Source/core/page/PerformanceUserTiming.cpp
+++ b/Source/core/page/PerformanceUserTiming.cpp
@@ -31,6 +31,7 @@
#include "core/page/Performance.h"
#include "core/page/PerformanceMark.h"
#include "core/page/PerformanceMeasure.h"
+#include "core/platform/HistogramSupport.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -107,6 +108,7 @@ void UserTiming::mark(const String& markName, ExceptionState& es)
double startTime = m_performance->now();
insertPerformanceEntry(m_marksMap, PerformanceMark::create(markName, startTime));
+ HistogramSupport::histogramCustomCounts("PLT.UserTiming_Mark", static_cast<int>(startTime), 0, 600000, 100);
}
void UserTiming::clearMarks(const String& markName)
@@ -154,6 +156,8 @@ void UserTiming::measure(const String& measureName, const String& startMark, con
}
insertPerformanceEntry(m_measuresMap, PerformanceMeasure::create(measureName, startTime, endTime));
+ if (endTime >= startTime)
+ HistogramSupport::histogramCustomCounts("PLT.UserTiming_MeasureDuration", static_cast<int>(endTime - startTime), 0, 600000, 100);
}
void UserTiming::clearMeasures(const String& measureName)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698