[gimp-web/wip/Jehan/fix-ci: 3/4] Add some debugging for the CI.




commit 142e1ba582fa6f34d3e19a4ce19285eb94e2b79a
Author: Jehan <jehan girinstud io>
Date:   Sun May 1 20:32:31 2022 +0200

    Add some debugging for the CI.

 tools/downloads/gimp-check-mirrors.py | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/tools/downloads/gimp-check-mirrors.py b/tools/downloads/gimp-check-mirrors.py
index 4446950a..fe9802c6 100755
--- a/tools/downloads/gimp-check-mirrors.py
+++ b/tools/downloads/gimp-check-mirrors.py
@@ -8,6 +8,7 @@ import hashlib
 import re
 import requests
 import sys
+import time
 
 # argparse for mirrorsfile and uri
 parser = argparse.ArgumentParser(description='Check if GIMP download mirrors have a file from 
download.gimp.org.')
@@ -94,6 +95,8 @@ def find_latest():
     return latest
 
 def verify_remote(uri, future):
+  start = time.monotonic()
+  print("verify_remote({}) START {}".format(uri, start))
   success     = False
   status      = None
   checksum_ok = None
@@ -129,6 +132,7 @@ def verify_remote(uri, future):
     status = 'Too many redirects'
   except OSError as error:
     status = str(error.strerror)
+  print("verify_remote({}) END took {}".format(uri, time.monotonic() - start))
 
   return uri, success, status, checksum_ok
 
@@ -148,10 +152,13 @@ error_count = 0
 check_count = 0
 
 def get_checksum(local_uri):
+  start = time.monotonic()
+  print("get_checksum({}) START {}".format(local_uri, start))
   with requests.get('https://download.gimp.org/pub/gimp/' + local_uri, stream=True) as response:
     origin_sum = hashlib.sha256()
     for line in response.iter_content(chunk_size=65536, decode_unicode=False):
       origin_sum.update(line)
+  print("get_checksum({}) END took {}".format(local_uri, time.monotonic() - start))
   return origin_sum.digest()
 
 origin_checksums = {}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]