Commit b47e22b6 authored by Victor Costan's avatar Victor Costan Committed by Commit Bot

IndexedDB: Remove WebCore.IndexedDB.FrontEndAPICalls UMA histogram.

The metrics have not been used in a while, and have no immediately clear
use case.

Bug: 850539
Change-Id: If11dcadf946bc66071ecb85aa126981a149193b3
Reviewed-on: https://chromium-review.googlesource.com/1146076Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarDaniel Murphy <dmurph@chromium.org>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577249}
parent 743d97bb
...@@ -22,7 +22,6 @@ blink_modules_sources("indexeddb") { ...@@ -22,7 +22,6 @@ blink_modules_sources("indexeddb") {
"idb_event_dispatcher.h", "idb_event_dispatcher.h",
"idb_factory.cc", "idb_factory.cc",
"idb_factory.h", "idb_factory.h",
"idb_histograms.h",
"idb_index.cc", "idb_index.cc",
"idb_index.h", "idb_index.h",
"idb_key.cc", "idb_key.cc",
......
...@@ -265,7 +265,6 @@ IDBObjectStore* IDBDatabase::createObjectStore( ...@@ -265,7 +265,6 @@ IDBObjectStore* IDBDatabase::createObjectStore(
bool auto_increment, bool auto_increment,
ExceptionState& exception_state) { ExceptionState& exception_state) {
IDB_TRACE("IDBDatabase::createObjectStore"); IDB_TRACE("IDBDatabase::createObjectStore");
RecordApiCallsHistogram(kIDBCreateObjectStoreCall);
if (!version_change_transaction_) { if (!version_change_transaction_) {
exception_state.ThrowDOMException( exception_state.ThrowDOMException(
...@@ -331,7 +330,6 @@ IDBObjectStore* IDBDatabase::createObjectStore( ...@@ -331,7 +330,6 @@ IDBObjectStore* IDBDatabase::createObjectStore(
void IDBDatabase::deleteObjectStore(const String& name, void IDBDatabase::deleteObjectStore(const String& name,
ExceptionState& exception_state) { ExceptionState& exception_state) {
IDB_TRACE("IDBDatabase::deleteObjectStore"); IDB_TRACE("IDBDatabase::deleteObjectStore");
RecordApiCallsHistogram(kIDBDeleteObjectStoreCall);
if (!version_change_transaction_) { if (!version_change_transaction_) {
exception_state.ThrowDOMException( exception_state.ThrowDOMException(
DOMExceptionCode::kInvalidStateError, DOMExceptionCode::kInvalidStateError,
...@@ -371,7 +369,6 @@ IDBTransaction* IDBDatabase::transaction( ...@@ -371,7 +369,6 @@ IDBTransaction* IDBDatabase::transaction(
const String& mode_string, const String& mode_string,
ExceptionState& exception_state) { ExceptionState& exception_state) {
IDB_TRACE("IDBDatabase::transaction"); IDB_TRACE("IDBDatabase::transaction");
RecordApiCallsHistogram(kIDBTransactionCall);
HashSet<String> scope; HashSet<String> scope;
if (store_names.IsString()) { if (store_names.IsString()) {
...@@ -598,13 +595,6 @@ ExecutionContext* IDBDatabase::GetExecutionContext() const { ...@@ -598,13 +595,6 @@ ExecutionContext* IDBDatabase::GetExecutionContext() const {
return ContextLifecycleObserver::GetExecutionContext(); return ContextLifecycleObserver::GetExecutionContext();
} }
void IDBDatabase::RecordApiCallsHistogram(IndexedDatabaseMethods method) {
DEFINE_THREAD_SAFE_STATIC_LOCAL(
EnumerationHistogram, api_calls_histogram,
("WebCore.IndexedDB.FrontEndAPICalls", kIDBMethodsMax));
api_calls_histogram.Count(method);
}
STATIC_ASSERT_ENUM(kWebIDBDatabaseExceptionUnknownError, STATIC_ASSERT_ENUM(kWebIDBDatabaseExceptionUnknownError,
DOMExceptionCode::kUnknownError); DOMExceptionCode::kUnknownError);
STATIC_ASSERT_ENUM(kWebIDBDatabaseExceptionConstraintError, STATIC_ASSERT_ENUM(kWebIDBDatabaseExceptionConstraintError,
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "third_party/blink/renderer/modules/event_modules.h" #include "third_party/blink/renderer/modules/event_modules.h"
#include "third_party/blink/renderer/modules/event_target_modules.h" #include "third_party/blink/renderer/modules/event_target_modules.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_database_callbacks.h" #include "third_party/blink/renderer/modules/indexeddb/idb_database_callbacks.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_histograms.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_metadata.h" #include "third_party/blink/renderer/modules/indexeddb/idb_metadata.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_object_store.h" #include "third_party/blink/renderer/modules/indexeddb/idb_object_store.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_object_store_parameters.h" #include "third_party/blink/renderer/modules/indexeddb/idb_object_store_parameters.h"
...@@ -171,8 +170,6 @@ class MODULES_EXPORT IDBDatabase final ...@@ -171,8 +170,6 @@ class MODULES_EXPORT IDBDatabase final
static const char kTransactionReadOnlyErrorMessage[]; static const char kTransactionReadOnlyErrorMessage[];
static const char kDatabaseClosedErrorMessage[]; static const char kDatabaseClosedErrorMessage[];
static void RecordApiCallsHistogram(IndexedDatabaseMethods);
protected: protected:
// EventTarget // EventTarget
DispatchEventResult DispatchEventInternal(Event*) override; DispatchEventResult DispatchEventInternal(Event*) override;
......
...@@ -120,7 +120,6 @@ IDBOpenDBRequest* IDBFactory::OpenInternal(ScriptState* script_state, ...@@ -120,7 +120,6 @@ IDBOpenDBRequest* IDBFactory::OpenInternal(ScriptState* script_state,
ExceptionState& exception_state) { ExceptionState& exception_state) {
IDB_TRACE1("IDBFactory::open", "name", name.Utf8()); IDB_TRACE1("IDBFactory::open", "name", name.Utf8());
IDBRequest::AsyncTraceState metrics("IDBFactory::open"); IDBRequest::AsyncTraceState metrics("IDBFactory::open");
IDBDatabase::RecordApiCallsHistogram(kIDBOpenCall);
DCHECK(version >= 1 || version == IDBDatabaseMetadata::kNoVersion); DCHECK(version >= 1 || version == IDBDatabaseMetadata::kNoVersion);
if (!IsContextValid(ExecutionContext::From(script_state))) if (!IsContextValid(ExecutionContext::From(script_state)))
return nullptr; return nullptr;
...@@ -190,7 +189,6 @@ IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal( ...@@ -190,7 +189,6 @@ IDBOpenDBRequest* IDBFactory::DeleteDatabaseInternal(
bool force_close) { bool force_close) {
IDB_TRACE1("IDBFactory::deleteDatabase", "name", name.Utf8()); IDB_TRACE1("IDBFactory::deleteDatabase", "name", name.Utf8());
IDBRequest::AsyncTraceState metrics("IDBFactory::deleteDatabase"); IDBRequest::AsyncTraceState metrics("IDBFactory::deleteDatabase");
IDBDatabase::RecordApiCallsHistogram(kIDBDeleteDatabaseCall);
if (!IsContextValid(ExecutionContext::From(script_state))) if (!IsContextValid(ExecutionContext::From(script_state)))
return nullptr; return nullptr;
if (!ExecutionContext::From(script_state) if (!ExecutionContext::From(script_state)
......
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_INDEXEDDB_IDB_HISTOGRAMS_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_INDEXEDDB_IDB_HISTOGRAMS_H_
namespace blink {
enum IndexedDatabaseMethods {
kIDBCreateObjectStoreCall,
kIDBDeleteObjectStoreCall,
kIDBTransactionCall,
kIDBDeleteDatabaseCall,
kIDBOpenCall,
kIDBMethodsMax,
};
} // namespace blink
#endif
...@@ -24368,6 +24368,9 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> ...@@ -24368,6 +24368,9 @@ Called by update_gpu_driver_bug_workaround_entries.py.-->
</enum> </enum>
<enum name="IndexedDatabaseMethods"> <enum name="IndexedDatabaseMethods">
<obsolete>
Deprecated as of July 2018.
</obsolete>
<int value="0" label="CreateObjectStore()"/> <int value="0" label="CreateObjectStore()"/>
<int value="1" label="DeleteObjectStore()"/> <int value="1" label="DeleteObjectStore()"/>
<int value="2" label="Transaction()"/> <int value="2" label="Transaction()"/>
...@@ -110275,6 +110275,9 @@ uploading your change for review. ...@@ -110275,6 +110275,9 @@ uploading your change for review.
<histogram name="WebCore.IndexedDB.FrontEndAPICalls" <histogram name="WebCore.IndexedDB.FrontEndAPICalls"
enum="IndexedDatabaseMethods"> enum="IndexedDatabaseMethods">
<obsolete>
Deprecated as of July 2018.
</obsolete>
<owner>dgrogan@chromium.org</owner> <owner>dgrogan@chromium.org</owner>
<summary> <summary>
Count total number of front end API calls of IndexedDB methods. Count total number of front end API calls of IndexedDB methods.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment