Commit 5ba43a6b authored by tonyg@chromium.org's avatar tonyg@chromium.org

[Telemetry] Fix page_cycler benchmark on machines in positive timezones.

The creation date in GetChildPids is in the form <date>[-+]<timezone>. The
old code only handled negative timezones. This updates it to handle both.

BUG=232254
TEST=morejs page cycler on windows with timezone set to israel
NOTRY=True

Review URL: https://codereview.chromium.org/14328005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194686 0039d316-1c4b-4281-b951-d872f2087c98
parent 071fc25c
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import collections import collections
import ctypes import ctypes
import re
import subprocess import subprocess
try: try:
import pywintypes # pylint: disable=F0401 import pywintypes # pylint: disable=F0401
...@@ -113,7 +114,7 @@ class WinPlatformBackend(platform_backend.PlatformBackend): ...@@ -113,7 +114,7 @@ class WinPlatformBackend(platform_backend.PlatformBackend):
_, creation, curr_ppid, curr_pid = creation_ppid_pid.split(',') _, creation, curr_ppid, curr_pid = creation_ppid_pid.split(',')
ppid_map[int(curr_ppid)].append(int(curr_pid)) ppid_map[int(curr_ppid)].append(int(curr_pid))
if creation: if creation:
creation_map[int(curr_pid)] = float(creation.split('-')[0]) creation_map[int(curr_pid)] = float(re.split('[+-]', creation)[0])
def _InnerGetChildPids(pid): def _InnerGetChildPids(pid):
if not pid or pid not in ppid_map: if not pid or pid not in ppid_map:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment