Commit 6c68b5de authored by tonyg@chromium.org's avatar tonyg@chromium.org

[Telemetry] Speed up page cycler by another ~20%.

This reduces cycle time of one moz iteration from just under 4m to just over 3m.

It assumes that pids won't be re-used, which isn't totally valid, but I think
the chances of rolling over the pid space within a single benchmark is a low
enough risk that we should do this.

BUG=372489

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270139 0039d316-1c4b-4281-b951-d872f2087c98
parent a74ddbcd
...@@ -157,12 +157,12 @@ class AndroidPlatformBackend( ...@@ -157,12 +157,12 @@ class AndroidPlatformBackend(
break break
return child_pids return child_pids
@decorators.Cache
def GetCommandLine(self, pid): def GetCommandLine(self, pid):
ps = self._GetPsOutput(['pid', 'name']) ps = self._GetPsOutput(['pid', 'name'], pid)
for curr_pid, curr_name in ps: if not ps:
if int(curr_pid) == pid: raise exceptions.ProcessGoneException()
return curr_name return ps[0][1]
raise exceptions.ProcessGoneException()
def GetOSName(self): def GetOSName(self):
return 'android' return 'android'
......
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