Skip to content

Commit 0dca662

Browse files
authored
Logging: log time spent to upload build artifacts (#9568)
Start collecting how much time (in seconds) it takes to upload all the build artifacts for each project. Related #9448
1 parent 2c11ab1 commit 0dca662

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

readthedocs/projects/tasks/builds.py

+5
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ def on_success(self, retval, task_id, args, kwargs):
517517
pdf = self.data.outcomes['pdf']
518518
epub = self.data.outcomes['epub']
519519

520+
time_before_store_build_artifacts = timezone.now()
520521
# Store build artifacts to storage (local or cloud storage)
521522
self.store_build_artifacts(
522523
html=html,
@@ -525,6 +526,10 @@ def on_success(self, retval, task_id, args, kwargs):
525526
pdf=pdf,
526527
epub=epub,
527528
)
529+
log.info(
530+
"Store build artifacts finished.",
531+
time=(timezone.now() - time_before_store_build_artifacts).seconds,
532+
)
528533

529534
# NOTE: we are updating the db version instance *only* when
530535
# HTML are built successfully.

0 commit comments

Comments
 (0)