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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 524553002: ServiceWorker: UMA histogram to track the size of Service Worker scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 21828f6521a9b51c4e8c50e283fe6f5af0fe6693..9229dbd5b1baf70a7f8b3d61f15bdec382aa5964 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -50,6 +50,7 @@
#include "platform/SharedBuffer.h"
#include "platform/heap/Handle.h"
#include "platform/network/ContentSecurityPolicyParsers.h"
+#include "public/platform/Platform.h"
#include "public/platform/WebURLRequest.h"
#include "public/web/WebServiceWorkerContextClient.h"
#include "public/web/WebServiceWorkerNetworkProvider.h"
@@ -362,6 +363,8 @@ void WebEmbeddedWorkerImpl::onScriptLoaderFinished()
return;
}
+ Platform::current()->histogramCustomCounts("ServiceWorker.ScriptSizeInKB", m_mainScriptLoader->script().length() / 1024, 0, 10 * 1024, 50);
jochen (gone - plz use gerrit) 2014/09/02 07:59:07 for KB histograms, we usually use 1000, 500000, 50
Kunihiko Sakamoto 2014/09/02 08:51:48 Thanks for pointing it out. Changed to (1000, 5000
+
if (m_pauseAfterDownloadState == DoPauseAfterDownload) {
m_pauseAfterDownloadState = IsPausedAfterDownload;
m_workerContextClient->didPauseAfterDownload();
« 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