mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
ci/lava: Break section-header print into separate function
Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
This commit is contained in:
parent
bfe03bb6a0
commit
586abb1e10
1 changed files with 6 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ class GitlabSection:
|
|||
def start(self) -> str:
|
||||
assert not self.has_finished, "Starting an already finished section"
|
||||
self.__start_time = datetime.now()
|
||||
return self.print_start_section()
|
||||
|
||||
def print_start_section(self) -> str:
|
||||
return self.section(marker="start", header=self.header, time=self.__start_time)
|
||||
|
||||
def end(self) -> str:
|
||||
|
|
@ -91,6 +94,9 @@ class GitlabSection:
|
|||
assert (
|
||||
self.__end_time >= self.__start_time
|
||||
), "Section execution time will be negative"
|
||||
return self.print_end_section()
|
||||
|
||||
def print_end_section(self) -> str:
|
||||
return self.section(marker="end", header="", time=self.__end_time)
|
||||
|
||||
def delta_time(self) -> Optional[timedelta]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue