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

Unified Diff: tools/telemetry/telemetry/internal/platform/profiler/netlog_profiler.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/platform/profiler/netlog_profiler.py
diff --git a/tools/telemetry/telemetry/internal/platform/profiler/netlog_profiler.py b/tools/telemetry/telemetry/internal/platform/profiler/netlog_profiler.py
deleted file mode 100644
index 1e27a6b0f1295f04498983eb0d3b3902fcb75957..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/platform/profiler/netlog_profiler.py
+++ /dev/null
@@ -1,51 +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 logging
-import tempfile
-
-from telemetry.internal.platform import profiler
-
-
-class NetLogProfiler(profiler.Profiler):
-
- _NET_LOG_ARG = '--log-net-log='
-
- @classmethod
- def name(cls):
- return 'netlog'
-
- @classmethod
- def is_supported(cls, browser_type):
- return not browser_type.startswith('cros')
-
- @classmethod
- def CustomizeBrowserOptions(cls, browser_type, options):
- if browser_type.startswith('android'):
- dump_file = '/sdcard/net-internals-profile.json'
- else:
- dump_file = tempfile.mkstemp()[1]
- options.AppendExtraBrowserArgs([cls._NET_LOG_ARG + dump_file])
-
- def CollectProfile(self):
- # Find output filename from browser argument.
- for i in self._browser_backend.browser_options.extra_browser_args:
- if i.startswith(self._NET_LOG_ARG):
- output_file = i[len(self._NET_LOG_ARG):]
- assert output_file
- # On Android pull the output file to the host.
- if self._platform_backend.GetOSName() == 'android':
- host_output_file = '%s.json' % self._output_path
- try:
- self._browser_backend.device.PullFile(
- output_file, host_output_file)
- except:
- logging.exception('New exception caused by DeviceUtils conversion')
- raise
- # Clean the device
- self._browser_backend.device.RunShellCommand('rm %s' % output_file)
- output_file = host_output_file
- print 'Net-internals log saved as %s' % output_file
- print 'To view, open in chrome://net-internals'
- return [output_file]

Powered by Google App Engine
This is Rietveld 408576698