| Index: third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp
|
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp b/third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp
|
| index c13f78dbe5e19970aa80e38c9d4a96a0cd9ff31d..9bbbb7e7c5420dea202b3c42ccdd4165e9cb34de 100644
|
| --- a/third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp
|
| +++ b/third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp
|
| @@ -30,6 +30,7 @@
|
| #include "core/timing/PerformanceBase.h"
|
| #include "core/timing/PerformanceMark.h"
|
| #include "core/timing/PerformanceMeasure.h"
|
| +#include "platform/Histogram.h"
|
| #include "platform/TraceEvent.h"
|
| #include "public/platform/Platform.h"
|
| #include "wtf/text/StringHash.h"
|
| @@ -114,7 +115,8 @@ PerformanceEntry* UserTiming::mark(const String& markName, ExceptionState& excep
|
| double startTime = m_performance->now();
|
| PerformanceEntry* entry = PerformanceMark::create(markName, startTime);
|
| insertPerformanceEntry(m_marksMap, *entry);
|
| - Platform::current()->histogramCustomCounts("PLT.UserTiming_Mark", static_cast<int>(startTime), 0, 600000, 100);
|
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, userTimingMarkHistogram, new CustomCountHistogram("PLT.UserTiming_Mark", 0, 600000, 100));
|
| + userTimingMarkHistogram.count(static_cast<int>(startTime));
|
| return entry;
|
| }
|
|
|
| @@ -173,8 +175,10 @@ PerformanceEntry* UserTiming::measure(const String& measureName, const String& s
|
|
|
| PerformanceEntry* entry = PerformanceMeasure::create(measureName, startTime, endTime);
|
| insertPerformanceEntry(m_measuresMap, *entry);
|
| - if (endTime >= startTime)
|
| - Platform::current()->histogramCustomCounts("PLT.UserTiming_MeasureDuration", static_cast<int>(endTime - startTime), 0, 600000, 100);
|
| + if (endTime >= startTime) {
|
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, measureDurationHistogram, new CustomCountHistogram("PLT.UserTiming_MeasureDuration", 0, 600000, 100));
|
| + measureDurationHistogram.count(static_cast<int>(endTime - startTime));
|
| + }
|
| return entry;
|
| }
|
|
|
|
|