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

Unified Diff: tools/telemetry/telemetry/core/timeline/empty_trace_importer.py

Issue 141553009: Make empty traces a non-critical error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/timeline/model.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/timeline/empty_trace_importer.py
diff --git a/tools/telemetry/telemetry/core/timeline/empty_trace_importer.py b/tools/telemetry/telemetry/core/timeline/empty_trace_importer.py
new file mode 100644
index 0000000000000000000000000000000000000000..925ee6b67d0c04971fa714496191e55f56a7cc08
--- /dev/null
+++ b/tools/telemetry/telemetry/core/timeline/empty_trace_importer.py
@@ -0,0 +1,22 @@
+# Copyright (c) 2014 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.
+
+class EmptyTraceImporter(object):
+ """Imports empty traces."""
+ def __init__(self, model, event_data, import_priority=0):
+ pass
+
+ @staticmethod
+ def CanImport(event_data):
+ if isinstance(event_data, list):
+ return len(event_data) == 0
+ elif isinstance(event_data, basestring):
+ return len(event_data) == 0
+ return False
+
+ def ImportEvents(self):
+ pass
+
+ def FinalizeImport(self):
+ pass
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/timeline/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698