 Chromium Code Reviews
 Chromium Code Reviews Issue 2003293003:
  [Binding] [UMA] Add a UMA to track time spent in WindowProxy::initialize  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2003293003:
  [Binding] [UMA] Add a UMA to track time spent in WindowProxy::initialize  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp | 
| diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp | 
| index 7b6d9481037862a9ae2daf4096626ba8ec1464c3..d91a9dae7b335ca963241c53f85495a56d1af6f1 100644 | 
| --- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp | 
| +++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp | 
| @@ -61,6 +61,7 @@ | 
| #include "platform/weborigin/SecurityOrigin.h" | 
| #include "public/platform/Platform.h" | 
| #include "wtf/Assertions.h" | 
| +#include "wtf/CurrentTime.h" | 
| #include "wtf/OwnPtr.h" | 
| #include "wtf/StringExtras.h" | 
| #include "wtf/text/CString.h" | 
| @@ -225,6 +226,7 @@ bool WindowProxy::initialize() | 
| { | 
| TRACE_EVENT0("v8", "WindowProxy::initialize"); | 
| TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "InitializeWindow"); | 
| + double startTime = currentTimeMS(); | 
| 
kouhei (in TOK)
2016/05/24 09:08:12
use monotonicallyIncreasingTime() instead of curre
 
peria
2016/05/24 09:36:24
Oh, I misunderstood the last argument of CustomCou
 | 
| ScriptForbiddenScope::AllowUserAgentScript allowScript; | 
| @@ -269,6 +271,10 @@ bool WindowProxy::initialize() | 
| MainThreadDebugger::instance()->contextCreated(m_scriptState.get(), frame, origin); | 
| frame->loader().client()->didCreateScriptContext(context, m_world->extensionGroup(), m_world->worldId()); | 
| } | 
| + | 
| + double endTime = currentTimeMS(); | 
| + DEFINE_STATIC_LOCAL(CustomCountHistogram, initializeHistogram, ("Blink.Binding.InitializeWindowProxy", 0, 200, 5)); | 
| + initializeHistogram.count(endTime - startTime); | 
| return true; | 
| } |