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

Side by Side Diff: tools/telemetry/telemetry/core/platform/profiler/monsoon_profiler.py

Issue 186143002: Don't set the max current on the monsoon device by default (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import csv 5 import csv
6 import multiprocessing 6 import multiprocessing
7 7
8 from telemetry.core import exceptions 8 from telemetry.core import exceptions
9 from telemetry.core.platform import profiler 9 from telemetry.core.platform import profiler
10 from telemetry.core.platform.profiler import monsoon 10 from telemetry.core.platform.profiler import monsoon
11 11
12 12
13 def _CollectData(output_path, is_collecting): 13 def _CollectData(output_path, is_collecting):
14 mon = monsoon.Monsoon(wait=False) 14 mon = monsoon.Monsoon(wait=False)
15 mon.SetMaxCurrent(2.0)
16 # Note: Telemetry requires the device to be connected by USB, but that 15 # Note: Telemetry requires the device to be connected by USB, but that
17 # puts it in charging mode. This increases the power consumption. 16 # puts it in charging mode. This increases the power consumption.
18 mon.SetUsbPassthrough(1) 17 mon.SetUsbPassthrough(1)
19 # Nominal Li-ion voltage is 3.7V, but it puts out 4.2V at max capacity. Use 18 # Nominal Li-ion voltage is 3.7V, but it puts out 4.2V at max capacity. Use
20 # 4.0V to simulate a "~80%" charged battery. Google "li-ion voltage curve". 19 # 4.0V to simulate a "~80%" charged battery. Google "li-ion voltage curve".
21 # This is true only for a single cell. (Most smartphones, some tablets.) 20 # This is true only for a single cell. (Most smartphones, some tablets.)
22 mon.SetVoltage(4.0) 21 mon.SetVoltage(4.0)
23 22
24 samples = [] 23 samples = []
25 try: 24 try:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 monsoon.Monsoon(wait=False) 75 monsoon.Monsoon(wait=False)
77 except EnvironmentError: 76 except EnvironmentError:
78 return False 77 return False
79 else: 78 else:
80 return True 79 return True
81 80
82 def CollectProfile(self): 81 def CollectProfile(self):
83 self._is_collecting.clear() 82 self._is_collecting.clear()
84 self._collector.join() 83 self._collector.join()
85 return [self._output_path] 84 return [self._output_path]
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698