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

Unified Diff: tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_memory.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_memory.py
diff --git a/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_memory.py b/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_memory.py
deleted file mode 100644
index cd4ddf01a7faa13d8f50f751dbd53a07db206894..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_memory.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import json
-
-from telemetry.core import exceptions
-
-
-class InspectorMemoryException(exceptions.Error):
- pass
-
-
-class InspectorMemory(object):
- """Communicates with the remote inspector's Memory domain."""
-
- def __init__(self, inspector_websocket):
- self._inspector_websocket = inspector_websocket
- self._inspector_websocket.RegisterDomain('Memory', self._OnNotification)
-
- def _OnNotification(self, msg):
- pass
-
- def GetDOMCounters(self, timeout):
- """Retrieves DOM element counts.
-
- Args:
- timeout: The number of seconds to wait for the inspector backend to
- service the request before timing out.
-
- Returns:
- A dictionary containing the counts associated with "nodes", "documents",
- and "jsEventListeners".
- Raises:
- InspectorMemoryException
- websocket.WebSocketException
- socket.error
- exceptions.WebSocketDisconnected
- """
- res = self._inspector_websocket.SyncRequest({
- 'method': 'Memory.getDOMCounters'
- }, timeout)
- if ('result' not in res or
- 'nodes' not in res['result'] or
- 'documents' not in res['result'] or
- 'jsEventListeners' not in res['result']):
- raise InspectorMemoryException(
- 'Inspector returned unexpected result for Memory.getDOMCounters:\n' +
- json.dumps(res, indent=2))
- return {
- 'nodes': res['result']['nodes'],
- 'documents': res['result']['documents'],
- 'jsEventListeners': res['result']['jsEventListeners']
- }

Powered by Google App Engine
This is Rietveld 408576698