Commit 60104ddc authored by Ross McIlroy's avatar Ross McIlroy Committed by Chromium LUCI CQ

[Pinboard] Add patch to aggregated results

BUG=v8:9684

Change-Id: I91f0abfec542b81daaf113e8e7982d661ef7fdd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2629514
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843663}
parent 1ba1a9b4
...@@ -129,10 +129,12 @@ def StartPinpointJobs(state, date): ...@@ -129,10 +129,12 @@ def StartPinpointJobs(state, date):
logging.info(output) logging.info(output)
assert 'https://pinpoint' in output assert 'https://pinpoint' in output
bot = config['configuration'] bot = config['configuration']
patch = config['patch']
item['jobs'].append({ item['jobs'].append({
'id': output.split('/')[-1], 'id': output.split('/')[-1],
'status': 'queued', 'status': 'queued',
'bot': bot 'bot': bot,
'patch': patch,
}) })
state.append(item) state.append(item)
state.sort(key=lambda p: p['timestamp']) # Keep items sorted by date. state.sort(key=lambda p: p['timestamp']) # Keep items sorted by date.
...@@ -324,13 +326,16 @@ def GetRevisionResults(item): ...@@ -324,13 +326,16 @@ def GetRevisionResults(item):
df['timestamp'] - pd.DateOffset(years=1)) df['timestamp'] - pd.DateOffset(years=1))
df['bot'] = 'unknown' df['bot'] = 'unknown'
df['patch'] = 'unknown'
for j in item['jobs']: for j in item['jobs']:
bot = j.get('bot', 'unknown') bot = j.get('bot', 'unknown')
patch = j.get('patch', 'unknown')
df.loc[df['job_id'].str.contains(str(j['id'])), 'bot'] = bot df.loc[df['job_id'].str.contains(str(j['id'])), 'bot'] = bot
df.loc[df['job_id'].str.contains(str(j['id'])), 'patch'] = patch
return df[[ return df[[
'revision', 'timestamp', 'bot', 'label', 'benchmark', 'name', 'mean', 'revision', 'timestamp', 'bot', 'patch', 'label', 'benchmark', 'name',
'count' 'mean', 'count'
]] ]]
......
...@@ -54,10 +54,12 @@ class PinboardToolTests(unittest.TestCase): ...@@ -54,10 +54,12 @@ class PinboardToolTests(unittest.TestCase):
def testStartPinpointJobs(self, load_configs, get_last_commit): def testStartPinpointJobs(self, load_configs, get_last_commit):
load_configs.return_value = [{ load_configs.return_value = [{
'name': 'config1', 'name': 'config1',
'configuration': 'AndroidGo' 'configuration': 'AndroidGo',
'patch': '1234'
}, { }, {
'name': 'config2', 'name': 'config2',
'configuration': 'Pixel2' 'configuration': 'Pixel2',
'patch': '5678'
}] }]
get_last_commit.return_value = ('2a66bac4', '2019-03-17T23:50:16-07:00') get_last_commit.return_value = ('2a66bac4', '2019-03-17T23:50:16-07:00')
self.subprocess.check_output.side_effect = [ self.subprocess.check_output.side_effect = [
...@@ -75,11 +77,13 @@ class PinboardToolTests(unittest.TestCase): ...@@ -75,11 +77,13 @@ class PinboardToolTests(unittest.TestCase):
'jobs': [{ 'jobs': [{
'id': '14b4c451f40000', 'id': '14b4c451f40000',
'status': 'queued', 'status': 'queued',
'bot': 'AndroidGo' 'bot': 'AndroidGo',
'patch': '1234'
}, { }, {
'id': '11fae481f40000', 'id': '11fae481f40000',
'status': 'queued', 'status': 'queued',
'bot': 'Pixel2' 'bot': 'Pixel2',
'patch': '5678'
}] }]
}]) }])
......
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