Changeset 141735 in webkit


Ignore:
Timestamp:
Feb 3, 2013 9:11:35 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Adds usage instrumentation for indexedDB
Includes new header file in project files

https://bugs.webkit.org/show_bug.cgi?id=107772

Patch by Kassy Coan <kassycoan@chromium.org> on 2013-02-03
Reviewed by Tony Chang.

Currently untestable. Has zero effect apart from histogramming.

  • GNUmakefile.list.am:
  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::transaction):

  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):

  • Modules/indexeddb/IDBHistograms.h: Added.

(WebCore):

  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
Location:
trunk/Source/WebCore
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141733 r141735  
     12013-02-03  Kassy Coan  <kassycoan@chromium.org>
     2
     3        Adds usage instrumentation for indexedDB
     4        Includes new header file in project files
     5
     6        https://bugs.webkit.org/show_bug.cgi?id=107772
     7
     8        Reviewed by Tony Chang.
     9
     10        Currently untestable. Has zero effect apart from histogramming.
     11
     12        * GNUmakefile.list.am:
     13        * Modules/indexeddb/IDBDatabase.cpp:
     14        (WebCore::IDBDatabase::createObjectStore):
     15        (WebCore::IDBDatabase::deleteObjectStore):
     16        (WebCore::IDBDatabase::transaction):
     17        * Modules/indexeddb/IDBFactory.cpp:
     18        (WebCore::IDBFactory::openInternal):
     19        (WebCore::IDBFactory::deleteDatabase):
     20        * Modules/indexeddb/IDBHistograms.h: Added.
     21        (WebCore):
     22        * Target.pri:
     23        * WebCore.gypi:
     24        * WebCore.vcproj/WebCore.vcproj:
     25        * WebCore.xcodeproj/project.pbxproj:
     26
    1272013-02-03  Hayato Ito  <hayato@chromium.org>
    228
  • trunk/Source/WebCore/GNUmakefile.list.am

    r141733 r141735  
    18791879        Source/WebCore/Modules/indexeddb/IDBFactory.cpp \
    18801880        Source/WebCore/Modules/indexeddb/IDBFactory.h \
     1881    Source/WebCore/Modules/indexeddb/IDBHistograms.h \
    18811882        Source/WebCore/Modules/indexeddb/IDBIndex.cpp \
    18821883        Source/WebCore/Modules/indexeddb/IDBIndex.h \
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp

    r141013 r141735  
    3232#include "EventQueue.h"
    3333#include "ExceptionCode.h"
     34#include "HistogramSupport.h"
    3435#include "IDBAny.h"
    3536#include "IDBDatabaseCallbacks.h"
     
    3738#include "IDBDatabaseException.h"
    3839#include "IDBEventDispatcher.h"
     40#include "IDBHistograms.h"
    3941#include "IDBIndex.h"
    4042#include "IDBKeyPath.h"
     
    158160PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCode& ec)
    159161{
     162    HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBCreateObjectStoreCall, IDBMethodsMax);
    160163    if (!m_versionChangeTransaction) {
    161164        ec = IDBDatabaseException::InvalidStateError;
     
    196199void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec)
    197200{
     201    HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteObjectStoreCall, IDBMethodsMax);
    198202    if (!m_versionChangeTransaction) {
    199203        ec = IDBDatabaseException::InvalidStateError;
     
    218222PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCode& ec)
    219223{
     224    HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBTransactionCall, IDBMethodsMax);
    220225    if (!scope.size()) {
    221226        ec = IDBDatabaseException::InvalidAccessError;
  • trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp

    r141418 r141735  
    3636#include "Frame.h"
    3737#include "GroupSettings.h"
     38#include "HistogramSupport.h"
    3839#include "IDBBindingUtilities.h"
    3940#include "IDBDatabase.h"
     
    4142#include "IDBDatabaseException.h"
    4243#include "IDBFactoryBackendInterface.h"
     44#include "IDBHistograms.h"
    4345#include "IDBKey.h"
    4446#include "IDBKeyRange.h"
     
    123125PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ScriptExecutionContext* context, const String& name, int64_t version, ExceptionCode& ec)
    124126{
     127    HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBOpenCall, IDBMethodsMax);
    125128    ASSERT(version >= 1 || version == IDBDatabaseMetadata::NoIntVersion);
    126129    if (name.isNull()) {
     
    149152PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
    150153{
     154    HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteDatabaseCall, IDBMethodsMax);
    151155    if (name.isNull()) {
    152156        ec = TypeError;
  • trunk/Source/WebCore/Target.pri

    r141733 r141735  
    30813081        Modules/indexeddb/IDBFactoryBackendInterface.h \
    30823082        Modules/indexeddb/IDBFactoryBackendImpl.h \
     3083        Modules/indexeddb/IDBHistograms.h \
    30833084        Modules/indexeddb/IDBIndex.h \
    30843085        Modules/indexeddb/IDBKey.h \
  • trunk/Source/WebCore/WebCore.gypi

    r141733 r141735  
    743743            'Modules/indexeddb/IDBFactoryBackendInterface.cpp',
    744744            'Modules/indexeddb/IDBFactoryBackendInterface.h',
     745            'Modules/indexeddb/IDBHistograms.h',
    745746            'Modules/indexeddb/IDBIndex.cpp',
    746747            'Modules/indexeddb/IDBIndex.h',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r141617 r141735  
    2509525095                                </File>
    2509625096                                <File
     25097                                        RelativePath="../Modules\indexeddb\IDBHistograms.h"
     25098                                        >
     25099                                </File>
     25100                                <File
    2509725101                                        RelativePath="..\Modules\indexeddb\IDBIndex.cpp"
    2509825102                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r141733 r141735  
    14741474                4B6FA6F50C39E48C00087011 /* SmartReplace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */; };
    14751475                4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */; };
     1476                4B61737379636F616E277368 /* IDBHistograms.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B61737379636F616E277368 /* IDBHistograms.h */; };
    14761477                4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14771478                4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
Note: See TracChangeset for help on using the changeset viewer.