From a4ea4481dc7f31cce373ab11c3c84f4fc19a29c9 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 1 Nov 2024 11:35:46 +0100 Subject: [PATCH] Worker / Docs: Add time duration for manual builds per locale --- buildbot/worker/doc_manual.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildbot/worker/doc_manual.py b/buildbot/worker/doc_manual.py index 223db9c..9e0be4b 100755 --- a/buildbot/worker/doc_manual.py +++ b/buildbot/worker/doc_manual.py @@ -9,8 +9,10 @@ import os import pathlib import re import sys +import time from collections import OrderedDict +from datetime import timedelta from typing import Callable, Optional, Sequence sys.path.append(str(pathlib.Path(__file__).resolve().parent.parent)) @@ -94,6 +96,7 @@ def compile_doc(builder: ManualBuilder) -> None: # Generate manual for locale in locales: + start_timestamp = time.time() worker.utils.info(f"Generating {locale} in {doc_format}") num_threads = worker.configure.get_thread_count(thread_memory_in_GB=1.25) @@ -139,6 +142,10 @@ def compile_doc(builder: ManualBuilder) -> None: ) version_switch_file_path.write_text(version_switch_text) + time_total = time.time() - start_timestamp + time_delta = str(timedelta(seconds=time_total)) + worker.utils.info(f"Generated {locale} in {doc_format} in {time_delta}") + def package(builder: ManualBuilder) -> None: if not builder.needs_package_delivery: -- 2.30.2