diff options
author | Arthur She <arthur.she@linaro.org> | 2023-03-06 10:49:13 -0800 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2023-03-06 10:49:13 -0800 |
commit | 4c2a65cb6daa0b5fd5a85b4dc5d07de81b17db3a (patch) | |
tree | 23199ea6fec51cdcfe5ae3adc73ac43415a39e74 | |
parent | bc67edf8c75b7684d0564b10ed487901547849c7 (diff) |
draw-timestamp-chart.py:
Expend to 500 columns on the worksheet
Show test time and total time on the tests
Signed-off-by: Arthur She <arthur.she@linaro.org>
-rwxr-xr-x | draw-timestamp-chart.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/draw-timestamp-chart.py b/draw-timestamp-chart.py index e10fa63..9c79df1 100755 --- a/draw-timestamp-chart.py +++ b/draw-timestamp-chart.py @@ -10,11 +10,13 @@ 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}}, "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}}, "dockerfile-builder": {"backgroundColor": {"red": 0.27, "green": 0.5, "blue": 0.55}}} min_block = 3 # Minute per block @@ -25,7 +27,7 @@ row_formats = [] def create_worksheet(spreadsheet, job_name): # Add a new worksheet try: - worksheet = spreadsheet.add_worksheet(job_name, 185, 250) + worksheet = spreadsheet.add_worksheet(job_name, 185, 500) except: print(f"worksheet {job_name} is already exist") sys.exit(1) @@ -38,7 +40,7 @@ def create_worksheet(spreadsheet, job_name): 'sheetId': worksheet.id, 'dimension': 'COLUMNS', 'startIndex': 1, - 'endIndex': 250 + 'endIndex': 500 }, 'properties': { 'pixelSize': 5 @@ -140,7 +142,8 @@ if __name__ == "__main__": for t in tests: test = tests[t] duration = test["end"] - test["start"] - nr = [f"{t}\n({ms_to_hr_min(duration)})"] + inner_duration = test["innerEnd"] - test["innerStart"] + nr = [f"{t}\n(Total: {ms_to_hr_min(duration)} / Test: {ms_to_hr_min(inner_duration)})"] task_rows.append(nr) for k in keys: |