Worker / Docs: Add time duration for manual builds per locale #11
@ -9,8 +9,10 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from datetime import timedelta
|
||||||
from typing import Callable, Optional, Sequence
|
from typing import Callable, Optional, Sequence
|
||||||
|
|
||||||
sys.path.append(str(pathlib.Path(__file__).resolve().parent.parent))
|
sys.path.append(str(pathlib.Path(__file__).resolve().parent.parent))
|
||||||
@ -94,6 +96,7 @@ def compile_doc(builder: ManualBuilder) -> None:
|
|||||||
|
|
||||||
# Generate manual
|
# Generate manual
|
||||||
for locale in locales:
|
for locale in locales:
|
||||||
|
start_timestamp = time.time()
|
||||||
worker.utils.info(f"Generating {locale} in {doc_format}")
|
worker.utils.info(f"Generating {locale} in {doc_format}")
|
||||||
|
|
||||||
num_threads = worker.configure.get_thread_count(thread_memory_in_GB=1.25)
|
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)
|
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:
|
def package(builder: ManualBuilder) -> None:
|
||||||
if not builder.needs_package_delivery:
|
if not builder.needs_package_delivery:
|
||||||
|
Loading…
Reference in New Issue
Block a user