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

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/indexeddb_timeline.py

Issue 1238393003: [IndexedDB] Adding traces, perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 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
Index: tools/telemetry/telemetry/web_perf/metrics/indexeddb_timeline.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/indexeddb_timeline.py b/tools/telemetry/telemetry/web_perf/metrics/indexeddb_timeline.py
new file mode 100644
index 0000000000000000000000000000000000000000..79f562789424f4762634c967d1c19ab8a56b812f
--- /dev/null
+++ b/tools/telemetry/telemetry/web_perf/metrics/indexeddb_timeline.py
@@ -0,0 +1,84 @@
+# Copyright 2015 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.
+
+
+from telemetry.web_perf.metrics import trace_event_aggregator
+
+
+class IndexedDBTimelineMetric(trace_event_aggregator.TraceEventAggregator):
+ """Metrics for IndexedDB operations.
+ """
+
+ def __init__(self):
+ super(IndexedDBTimelineMetric, self).__init__()
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBDatabase::GetOperation',
+ list_metric_name='idb-gets',
+ list_metric_description='The duration of all "get" ops in IndexedDB',
+ units='ms',
+ count_metric_name='idb-get-count',
+ count_metric_description='The number of "get" ops',
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBDatabase::PutOperation',
+ list_metric_name='idb-puts',
+ list_metric_description='The duration of all "put" ops in IndexedDB',
+ units='ms',
+ count_metric_name='idb-put-count',
+ count_metric_description='The number of "put" ops',
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBFactoryImpl::Open',
+ list_metric_name='idb-opens',
+ list_metric_description='The duration of all "open" ops in IndexedDB',
+ units='ms',
+ count_metric_name='idb-opens-count',
+ count_metric_description='The number of "open" ops',
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBTransaction::Commit',
+ list_metric_name='idb-transaction-commits',
+ list_metric_description=('The duration of all "commit" ops of ' +
+ 'transactions in IndexedDB.'),
+ units='ms',
+ count_metric_name='idb-transaction-commits-count',
+ count_metric_description=('The number of "commit" ops for ' +
+ 'IndexedDB transactions.'),
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBFactoryImpl::DeleteDatabase',
+ list_metric_name='idb-database-deletes',
+ list_metric_description=('The duration of all "delete" ops of ' +
+ 'IndexedDB databases.'),
+ units='ms',
+ count_metric_name='idb-database-deletes-count',
+ count_metric_description=('The number of "delete" ops for ' +
+ 'IndexedDB databases.'),
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBDatabase::OpenCursorOperation',
+ list_metric_name='idb-cursor-opens',
+ list_metric_description=('The duration of all "open" ops of ' +
+ 'IndexedDB cursors.'),
+ units='ms',
+ count_metric_name='idb-cursor-opens-count',
+ count_metric_description=('The number of "open" ops for ' +
+ 'IndexedDB cursors.'),
+ process_name='Browser'))
+
+ self.AddInput(trace_event_aggregator.TraceEventAggregatorInput(
+ event_name='IndexedDBCursor::CursorIterationOperation',
+ list_metric_name='idb-cursor-iterations',
+ list_metric_description=('The duration of all "iteration" ops of ' +
+ 'IndexedDB cursors.'),
+ units='ms',
+ count_metric_name='idb-cursor-iterations-count',
+ count_metric_description=('The number of "iteration" ops for ' +
+ 'IndexedDB cursors.'),
+ process_name='Browser'))

Powered by Google App Engine
This is Rietveld 408576698