Commit 07938659 authored by Juan Antonio Navarro Perez's avatar Juan Antonio Navarro Perez Committed by Commit Bot

[soundwave] Mark reference runs for each benchmark individually

Compute "the last day" from which we have data for each benchmark/bot
individually. This way, if a benchmark (test_suite) has not run in a
day or two, we fall back to the latest run we can find as the
"reference" value.

Also take the chance to drop a few columns which are not currently in
use.

Bug: 991923
Change-Id: Icc7a806aa5205dfa3dd49e320f66f1e1eae9f034
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1743629Reviewed-by: default avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685163}
parent 09665d82
......@@ -24,7 +24,7 @@ def PostProcess(df):
# We use all runs on the latest day for each quarter as reference.
df['quarter'] = df['timestamp'].dt.to_period('Q')
df['reference'] = df['timestamp'].dt.date == df.groupby(
'quarter')['timestamp'].transform('max').dt.date
['quarter', 'test_suite', 'bot'])['timestamp'].transform('max').dt.date
# Change units for values in ms to seconds, and percent values.
df['units'] = df['units'].fillna('')
......@@ -34,4 +34,8 @@ def PostProcess(df):
is_percentage = df['units'].str.startswith('n%_')
df.loc[is_percentage, 'value'] = df['value'] * 100
# Remove unused columns to save space in the output csv.
for col in ('point_id', 'chromium_rev', 'clank_rev', 'trace_url'):
del df[col]
return df
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