diff options
author | Arthur She <arthur.she@linaro.org> | 2023-03-15 10:54:32 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2023-03-15 10:54:32 -0700 |
commit | 127b5220cbe716a1b650111e9f7f090aa5ee4352 (patch) | |
tree | 9528b9a55509198053be9c5559522d5313c4bd36 | |
parent | 4c2a65cb6daa0b5fd5a85b4dc5d07de81b17db3a (diff) |
draw-timestamp-chart.py: support pr jobs and multiple container-host
Signed-off-by: Arthur She <arthur.she@linaro.org>
-rwxr-xr-x | draw-timestamp-chart.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/draw-timestamp-chart.py b/draw-timestamp-chart.py index 9c79df1..5d5d4d0 100755 --- a/draw-timestamp-chart.py +++ b/draw-timestamp-chart.py @@ -10,13 +10,21 @@ import sys colors = {"main": {"backgroundColor": {"red": 1, "green": 0, "blue": 0}}, "windows": {"backgroundColor": {"red": 0, "green": 1, "blue": 0}}, "container-host": {"backgroundColor": {"red": 0, "green": 0, "blue": 1}}, - "freebsd": {"backgroundColor": {"red": 0, "green": 0, "blue": 1}}, + "container-host-A": {"backgroundColor": {"red": 0.29, "green": 0.53, "blue": 0.9}}, + "container-host-B": {"backgroundColor": {"red": 0.6, "green": 0, "blue": 1}}, + "container-host-C": {"backgroundColor": {"red": 0, "green": 1, "blue": 1}}, + "container-host-D": {"backgroundColor": {"red": 0.85, "green": 0.82, "blue": 0.91}}, + "freebsd": {"backgroundColor": {"red": 0.8, "green": 0.25, "blue": 0.15}}, "dockerfile-builder": {"backgroundColor": {"red": 0.27, "green": 0.5, "blue": 0.55}}} inner_colors = {"main": {"backgroundColor": {"red": 0.63, "green": 0.77, "blue": 0.79}}, "windows": {"backgroundColor": {"red": 1, "green": 0.6, "blue": 0}}, "container-host": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, - "freebsd": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, + "container-host-A": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, + "container-host-B": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, + "container-host-C": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, + "container-host-D": {"backgroundColor": {"red": 1, "green": 0, "blue": 1}}, + "freebsd": {"backgroundColor": {"red": 0, "green": 1, "blue": 1}}, "dockerfile-builder": {"backgroundColor": {"red": 0.27, "green": 0.5, "blue": 0.55}}} min_block = 3 # Minute per block @@ -122,10 +130,11 @@ if __name__ == "__main__": worksheet = create_worksheet(spreadsheet, job_name) # Draw main task - main_start_timestamp = td["main"]["release_jobs"]["start"] - end_timestamp = td["main"]["release_jobs"]["end"] + main_task = list(td["main"].keys())[0] + main_start_timestamp = td["main"][main_task]["start"] + end_timestamp = td["main"][main_task]["end"] duration = end_timestamp - main_start_timestamp - new_row = [f"main\n({ms_to_hr_min(duration)})", ""] + new_row = [f"{main_task}\n({ms_to_hr_min(duration)})", ""] updated_row = worksheet.append_row(new_row) num_blk = round(duration / ms_block) start_blk = 2 |