Skip to contentSkip to conversation

Improve performances and feedback of different

PATCH New Victor Huesca 3 participants 8 messages Jul 19, 2019 – Aug 1, 2019

lore
Share & tools
lore
#0 lore raw

v2 cover Improve performances and feedback of different

This patch serie extends the existing idea of making HTTP requests in parallel via the multiprocessing module. This allows way better performances (x5~10) at no cost.

This patch also implements helper function to ease providing feedback about the current state for this time consuming functions.

The 'package_make_init_info' function is slightly modified to call make only once (as suggested by Thomas).

Finaly an option to reduce verbosity is introduced since the per-package notification flouds the standard output.

Changes v1 --> v2:
- Replace multiprocessing by multiprocess (a fork)
- Add progress feedback when checking URLs
- Replace the multiple calls to make by a single one
- Add an option to reduce versbosity (hide per-package notification)

Victor Huesca (5):
support/scripts/pkg-stats: Use the 'multiprocess' fork instead of
'multiprocessing'
support/scripts/pkg-stats: retrieve packages latest version using
processes
support/scripts/pkg-stats: add current progress in 'check_url_status' support/scripts/pkg-stats: improve 'package_init_make_info' support/scripts/pkg-stats: add option to reduce verbosity

 support/scripts/pkg-stats | 193 +++++++++++++++++++++-----------------
 1 file changed, 108 insertions(+), 85 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH v2 1/5 support/scripts/pkg-stats: Use the 'multiprocess' fork instead of 'multiprocessing'

This fork has a better serialization process whereas 'multiprocessing' uses the half-broken pickle. This allow to use any kind of object for process-pool related function. In particular this change allow lambdas to be used as asynchronous function in 'Pool.apply_async'.

---
 support/scripts/pkg-stats | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
support/scripts/pkg-stats +1 -1
index 7dcb2b4cbd..77819c4804 100755
@@ -28,7 +28,7 @@ import json
 import certifi
 from urllib3 import HTTPSConnectionPool
 from urllib3.exceptions import HTTPError
-from multiprocessing import Pool
+from multiprocess import Pool
 
 INFRA_RE = re.compile(r"\$\(eval \$\(([a-z-]*)-package\)\)")
 URL_RE = re.compile(r"\s*https?://\S*\s*$")
Signature · 1 line
2.21.0
#2 lore raw

PATCH v2 2/5 support/scripts/pkg-stats: retrieve packages latest version using processes

In reply to Victor Huesca

The major bottleneck in pkg-stats is the time spent waiting for answer from distant servers. Two functions involve such communications with remote servers are:
- 'check_package_urls' which check that package website are up, it is efficient do to the use of process-pools thanks to Matt Weber.
- 'check_package_latest_version' which fetch the latest package version from release-monitoring, it uses a http-pool but run sequentially.

This patch extends the use of process-pools to 'check_latest_version'. This implementation rely on the apply_async's callback to allow per-package progress feedback. To simplify this feedback creation, this patch introduce the following functions:
- 'apply_async': this function simply wrap the Pool's method of the same in order to pass additional arguments to the callback. In particular it is used to print the package name in the feedback message.
- 'progress_callback': this function ease the definition of "progress feedback function": it create a callable that will keep track of how many time it has been called and print a custom message.

Also change the behaviour of print for python 2 to be a function instead of a statement, allowing to use it in lambdas.

Runtimes for this function are ~3m vs ~25m for the linear version. Tested on an i7 7500U (2/4 cores/threads @3.5GHz) with 15ms ping.

Note: There have already been work trying to parallelize this function using threads but there were a failure on some configurations [1]. This implementation rely on a dedicated module already in use on this script, so it's unlikely to see failure with this version.

[1] http://lists.busybox.net/pipermail/buildroot/2018-March/215368.html

---
 support/scripts/pkg-stats | 64 +++++++++++++++++++++++++++++++--------
 1 file changed, 52 insertions(+), 12 deletions(-)
support/scripts/pkg-stats +52 -12
index 77819c4804..08730b8d43 100755
@@ -16,6 +16,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
+from __future__ import print_function
 import argparse
 import datetime
 import fnmatch
@@ -159,6 +160,37 @@ class Package:
             (self.name, self.path, self.has_license, self.has_license_files, self.has_hash, self.patch_count)
 
 
+class progress_callback:
+    def __init__(self, progress_fn, start=0, end=100):
+        '''
+        Create a callback 'function' which purpose is to display a progress message.
+
+        :param progress_fn: must take at least 2 arguments representing the current step
+        and the 'end' step.
+        :param start: First step.
+        :param end: Last step.
+        '''
+        self._progress_fn = progress_fn
+        self._cpt = start
+        self._end = end
+
+    def __call__(self, *args):
+        '''
+        Calls progress_fn.
+        '''
+        self._progress_fn(self._cpt, self._end, *args)
+        self._cpt += 1
+
+
+def apply_async(pool, func, args=(), kwds={}, callback=None, cb_args=(), cb_kwds={}):
+    '''
+    Wrapper around `pool.apply_async()` to allow passing arguments to the callback
+    '''
+    _func = lambda: func(*args, **kwds)
+    _cb = lambda res: callback(res, *cb_args, **cb_kwds)
+    return pool.apply_async(_func, callback=_cb)
+
+
 def get_pkglist(npackages, package_list):
     """
     Builds the list of Buildroot packages, returning a list of Package
@@ -345,6 +377,14 @@ def release_monitoring_get_latest_version_by_guess(pool, name):
     return (RM_API_STATUS_NOT_FOUND, None, None)
 
 
+def check_package_latest_version_worker(pool, name):
+    """Wrapper to try both by name then by guess"""
+    res = release_monitoring_get_latest_version_by_distro(pool, name)
+    if res[0] == RM_API_STATUS_NOT_FOUND:
+        res = release_monitoring_get_latest_version_by_guess(pool, name)
+    return res
+
+
 def check_package_latest_version(packages):
     """
     Fills in the .latest_version field of all Package objects
@@ -360,18 +400,18 @@ def check_package_latest_version(packages):
     - id: string containing the id of the project corresponding to this
       package, as known by release-monitoring.org
     """
-    pool = HTTPSConnectionPool('release-monitoring.org', port=443,
-                               cert_reqs='CERT_REQUIRED', ca_certs=certifi.where(),
-                               timeout=30)
-    count = 0
-    for pkg in packages:
-        v = release_monitoring_get_latest_version_by_distro(pool, pkg.name)
-        if v[0] == RM_API_STATUS_NOT_FOUND:
-            v = release_monitoring_get_latest_version_by_guess(pool, pkg.name)
-
-        pkg.latest_version = v
-        print("[%d/%d] Package %s" % (count, len(packages), pkg.name))
-        count += 1
+    http_pool = HTTPSConnectionPool('release-monitoring.org', port=443,
+                                    cert_reqs='CERT_REQUIRED', ca_certs=certifi.where(),
+                                    timeout=30)
+    worker_pool = Pool(processes=64)
+    cb = progress_callback(
+        lambda i, n, (status, ver, id), name:
+            print("[%d/%d] (version) Package %s: %s" % (i, n, name, id)),
+        1, len(packages))
+    results = [apply_async(worker_pool, check_package_latest_version_worker, (http_pool, pkg.name),
+                           callback=cb, cb_args=(pkg.name,)) for pkg in packages]
+    for pkg, r in zip(packages, results):
+        pkg.latest_version = r.get()
 
 
 def calculate_stats(packages):
Signature · 1 line
2.21.0
#3 lore raw

PATCH v2 2/5 support/scripts/pkg-stats: retrieve packages latest version using processes

Victor,

Quoted 26 lines · Victor Huesca

The major bottleneck in pkg-stats is the time spent waiting for answer from distant servers. Two functions involve such communications with remote servers are:
- 'check_package_urls' which check that package website are up, it is efficient do to the use of process-pools thanks to Matt Weber.
- 'check_package_latest_version' which fetch the latest package version from release-monitoring, it uses a http-pool but run sequentially.

This patch extends the use of process-pools to 'check_latest_version'. This implementation rely on the apply_async's callback to allow per-package progress feedback. To simplify this feedback creation, this patch introduce the following functions:
- 'apply_async': this function simply wrap the Pool's method of the same in order to pass additional arguments to the callback. In particular it is used to print the package name in the feedback message.
- 'progress_callback': this function ease the definition of "progress feedback function": it create a callable that will keep track of how many time it has been called and print a custom message.

Also change the behaviour of print for python 2 to be a function instead of a statement, allowing to use it in lambdas.

Runtimes for this function are ~3m vs ~25m for the linear version. Tested on an i7 7500U (2/4 cores/threads @3.5GHz) with 15ms ping.

Quoted 8 lines

Note: There have already been work trying to parallelize this function using threads but there were a failure on some configurations [1]. This implementation rely on a dedicated module already in use on this script, so it's unlikely to see failure with this version.

[1] http://lists.busybox.net/pipermail/buildroot/2018-March/215368.html

Quoted 78 lines
---
 support/scripts/pkg-stats | 64 +++++++++++++++++++++++++++++++--------
 1 file changed, 52 insertions(+), 12 deletions(-)
support/scripts/pkg-stats +40 -5
index 77819c4804..08730b8d43 100755
@@ -16,6 +16,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
+from __future__ import print_function
 import argparse
 import datetime
 import fnmatch
@@ -159,6 +160,37 @@ class Package:
             (self.name, self.path, self.has_license, self.has_license_files, self.has_hash, self.patch_count)
 
 
+class progress_callback:
+    def __init__(self, progress_fn, start=0, end=100):
+        '''
+        Create a callback 'function' which purpose is to display a progress message.
+
+        :param progress_fn: must take at least 2 arguments representing the current step
+        and the 'end' step.
+        :param start: First step.
+        :param end: Last step.
+        '''
+        self._progress_fn = progress_fn
+        self._cpt = start
+        self._end = end
+
+    def __call__(self, *args):
+        '''
+        Calls progress_fn.
+        '''
+        self._progress_fn(self._cpt, self._end, *args)
+        self._cpt += 1
+
+
+def apply_async(pool, func, args=(), kwds={}, callback=None, cb_args=(), cb_kwds={}):
+    '''
+    Wrapper around `pool.apply_async()` to allow passing arguments to the callback
+    '''
+    _func = lambda: func(*args, **kwds)
+    _cb = lambda res: callback(res, *cb_args, **cb_kwds)
+    return pool.apply_async(_func, callback=_cb)
+
+
 def get_pkglist(npackages, package_list):
     """
     Builds the list of Buildroot packages, returning a list of Package
@@ -345,6 +377,14 @@ def release_monitoring_get_latest_version_by_guess(pool, name):
     return (RM_API_STATUS_NOT_FOUND, None, None)
 
 
+def check_package_latest_version_worker(pool, name):
+    """Wrapper to try both by name then by guess"""
+    res = release_monitoring_get_latest_version_by_distro(pool, name)
+    if res[0] == RM_API_STATUS_NOT_FOUND:
+        res = release_monitoring_get_latest_version_by_guess(pool, name)
+    return res
+
+
 def check_package_latest_version(packages):
     """
     Fills in the .latest_version field of all Package objects
@@ -360,18 +400,18 @@ def check_package_latest_version(packages):
     - id: string containing the id of the project corresponding to this
       package, as known by release-monitoring.org
     """
-    pool = HTTPSConnectionPool('release-monitoring.org', port=443,
-                               cert_reqs='CERT_REQUIRED', ca_certs=certifi.where(),
-                               timeout=30)
-    count = 0
-    for pkg in packages:

support/scripts/pkg-stats def check_package_latest_version(packages): · line 405

Quoted 10 lines
support/scripts/pkg-stats +3 -7
-        v = release_monitoring_get_latest_version_by_distro(pool, pkg.name)
-        if v[0] == RM_API_STATUS_NOT_FOUND:
-            v = release_monitoring_get_latest_version_by_guess(pool, pkg.name)
-
-        pkg.latest_version = v
-        print("[%d/%d] Package %s" % (count, len(packages), pkg.name))
-        count += 1
+    http_pool = HTTPSConnectionPool('release-monitoring.org', port=443,
+                                    cert_reqs='CERT_REQUIRED', ca_certs=certifi.where(),
+                                    timeout=30)

I had originally set the timeout above 5sec because of my network architecture (proxy's, etc). Hopefully we never hit the 30sec because of the standard protocol timeouts :-)

Quoted 19 lines
support/scripts/pkg-stats +9 -1
+    worker_pool = Pool(processes=64)
+    cb = progress_callback(
+        lambda i, n, (status, ver, id), name:
+            print("[%d/%d] (version) Package %s: %s" % (i, n, name, id)),
+        1, len(packages))
+    results = [apply_async(worker_pool, check_package_latest_version_worker, (http_pool, pkg.name),
+                           callback=cb, cb_args=(pkg.name,)) for pkg in packages]
+    for pkg, r in zip(packages, results):
+        pkg.latest_version = r.get()
 
 
 def calculate_stats(packages):
--

2.21.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH v2 3/5 support/scripts/pkg-stats: add current progress in 'check_url_status'

In reply to Victor Huesca

The 'check_url_status' function can take a few minutes to process depending on how many packages are involved. The current implementation uses process-pool to speed-up the completion time but does not allow to trace which package as complete nor to track the overall progress with for example: '[42/2243] Package jpeg'

This patch adds a progress feedback to 'check_url_status' to report the current package and the overall progression. It rely on the pool's callback and follow the same scheme as 'check_package_latest_version'.

This patch also remove the unnecessary 'url_worker' Package's attribute in favor of a local list of workers. This imply removing this field form the excluded fields from 'dump_json'.

---
 support/scripts/pkg-stats | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
support/scripts/pkg-stats +8 -8
index 08730b8d43..8b59cd1e76 100755
@@ -57,7 +57,6 @@ class Package:
         self.current_version = None
         self.url = None
         self.url_status = None
-        self.url_worker = None
         self.latest_version = (RM_API_STATUS_ERROR, None, None)
 
     def pkgvar(self):
@@ -319,7 +318,7 @@ def package_init_make_info():
         Package.all_versions[pkgvar] = value
 
 
-def check_url_status_worker(url, url_status):
+def check_url_status(url, url_status):
     if url_status != "Missing" and url_status != "No Config.in":
         try:
             url_status_code = requests.head(url, timeout=30).status_code
@@ -332,11 +331,12 @@ def check_url_status_worker(url, url_status):
 
 
 def check_package_urls(packages):
-    Package.pool = Pool(processes=64)
-    for pkg in packages:
-        pkg.url_worker = pkg.pool.apply_async(check_url_status_worker, (pkg.url, pkg.url_status))
-    for pkg in packages:
-        pkg.url_status = pkg.url_worker.get(timeout=3600)
+    pool = Pool(processes=64)
+    cb = progress_callback(lambda i, n, res, name: print("[%d/%d] (url) Package %s: %s" % (i, n, name, res)), 1, len(packages))
+    results = [apply_async(pool, check_url_status, (pkg.url, pkg.url_status),
+                           callback=cb, cb_args=(pkg.name,)) for pkg in packages]
+    for pkg, r in zip(packages, results):
+        pkg.url_status = r.get()
 
 
 def release_monitoring_get_latest_version_by_distro(pool, name):
@@ -735,7 +735,7 @@ def dump_html(packages, stats, date, commit, output):
 def dump_json(packages, stats, date, commit, output):
     # Format packages as a dictionnary instead of a list
     # Exclude local field that does not contains real date
-    excluded_fields = ['url_worker', 'name']
+    excluded_fields = ['name']
     pkgs = {
         pkg.name: {
             k: v
Signature · 1 line
2.21.0
#5 lore raw

PATCH v2 4/5 support/scripts/pkg-stats: improve 'package_init_make_info'

In reply to Victor Huesca

The pkg-stats calls 3 times make to get a bunch of variables. These variables could have been obtained in only one call. This patch replace the three calls by one and adjust the parsing logic accordingly.

Note: An other (better?) option suggested by Arnout would be to run make show-info that produces a json with the necessary variables. This would avoid the duplicated effort done in pkg-stats and pkg-utils and allow to add other infos to pkg-stats like dependencies, reversed dependencies or if the package is virtual.
In order to use this method, the following changes are required in pkg-generic's show-info.
- include license_files;
- have an option to run it on *all* packages, not just the selected ones.

This patch take the simplest approach of only factorize the make calls as it require less changes.

---
 support/scripts/pkg-stats | 83 +++++++++++++--------------------------
 1 file changed, 27 insertions(+), 56 deletions(-)
support/scripts/pkg-stats +27 -56
index 8b59cd1e76..5b27a806ef 100755
@@ -252,70 +252,41 @@ def get_pkglist(npackages, package_list):
 
 
 def package_init_make_info():
-    # Licenses
-    o = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y",
-                                 "-s", "printvars", "VARS=%_LICENSE"])
-    for l in o.splitlines():
-        # Get variable name and value
-        pkgvar, value = l.split("=")
-
-        # If present, strip HOST_ from variable name
-        if pkgvar.startswith("HOST_"):
-            pkgvar = pkgvar[5:]
-
-        # Strip _LICENSE
-        pkgvar = pkgvar[:-8]
-
-        # If value is "unknown", no license details available
-        if value == "unknown":
-            continue
-        Package.all_licenses.append(pkgvar)
-
-    # License files
-    o = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y",
-                                 "-s", "printvars", "VARS=%_LICENSE_FILES"])
-    for l in o.splitlines():
-        # Get variable name and value
-        pkgvar, value = l.split("=")
-
-        # If present, strip HOST_ from variable name
-        if pkgvar.startswith("HOST_"):
-            pkgvar = pkgvar[5:]
-
-        if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):
-            continue
-
-        # Strip _LICENSE_FILES
-        pkgvar = pkgvar[:-14]
-
-        Package.all_license_files.append(pkgvar)
-
-    # Version
-    o = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y",
-                                 "-s", "printvars", "VARS=%_VERSION"])
+    # Fetch all variables at once
+    variables = subprocess.check_output(["make", "BR2_HAVE_DOT_CONFIG=y", "-s", "printvars",
+                                         "VARS=%_LICENSE %_LICENSE_FILES %_VERSION"])
+    variable_list = variables.splitlines()
 
     # We process first the host package VERSION, and then the target
     # package VERSION. This means that if a package exists in both
-    # target and host variants, with different version numbers
-    # (unlikely), we'll report the target version number.
-    version_list = o.splitlines()
-    version_list = [x for x in version_list if x.startswith("HOST_")] + \
-                   [x for x in version_list if not x.startswith("HOST_")]
-    for l in version_list:
+    # target and host variants, with different values (eg. version
+    # numbers (unlikely)), we'll report the target one.
+    variable_list = [x[5:] for x in variable_list if x.startswith("HOST_")] + \
+                    [x for x in variable_list if not x.startswith("HOST_")]
+
+    for l in variable_list:
         # Get variable name and value
         pkgvar, value = l.split("=")
 
-        # If present, strip HOST_ from variable name
-        if pkgvar.startswith("HOST_"):
-            pkgvar = pkgvar[5:]
-
-        if pkgvar.endswith("_DL_VERSION"):
-            continue
+        # Strip the suffix according to the variable
+        if pkgvar.endswith("_LICENSE"):
+            # If value is "unknown", no license details available
+            if value == "unknown":
+                continue
+            pkgvar = pkgvar[:-8]
+            Package.all_licenses.append(pkgvar)
 
-        # Strip _VERSION
-        pkgvar = pkgvar[:-8]
+        elif pkgvar.endswith("_LICENSE_FILES") :
+            if pkgvar.endswith("_MANIFEST_LICENSE_FILES"):
+                continue
+            pkgvar = pkgvar[:-14]
+            Package.all_license_files.append(pkgvar)
 
-        Package.all_versions[pkgvar] = value
+        elif pkgvar.endswith("_VERSION"):
+            if pkgvar.endswith("_DL_VERSION"):
+                continue
+            pkgvar = pkgvar[:-8]
+            Package.all_versions[pkgvar] = value
 
 
 def check_url_status(url, url_status):
Signature · 1 line
2.21.0
#6 lore raw

PATCH v2 5/5 support/scripts/pkg-stats: add option to reduce verbosity

In reply to Victor Huesca

Having the output flooded by status for all packages may be unnecessary. This patch add a basic log level and set all print outside of the main to have lower level.

Running this script with '-q' only prints the main thread while it default prints all messages.

---
 support/scripts/pkg-stats | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)
support/scripts/pkg-stats +22 -10
index 5b27a806ef..dede8ced9d 100755
@@ -303,7 +303,7 @@ def check_url_status(url, url_status):
 
 def check_package_urls(packages):
     pool = Pool(processes=64)
-    cb = progress_callback(lambda i, n, res, name: print("[%d/%d] (url) Package %s: %s" % (i, n, name, res)), 1, len(packages))
+    cb = progress_callback(lambda i, n, res, name: log(1, "[%d/%d] (url) Package %s: %s" % (i, n, name, res)), 1, len(packages))
     results = [apply_async(pool, check_url_status, (pkg.url, pkg.url_status),
                            callback=cb, cb_args=(pkg.name,)) for pkg in packages]
     for pkg, r in zip(packages, results):
@@ -377,7 +377,7 @@ def check_package_latest_version(packages):
     worker_pool = Pool(processes=64)
     cb = progress_callback(
         lambda i, n, (status, ver, id), name:
-            print("[%d/%d] (version) Package %s: %s" % (i, n, name, id)),
+            log(1, "[%d/%d] (version) Package %s: %s" % (i, n, name, id)),
         1, len(packages))
     results = [apply_async(worker_pool, check_package_latest_version_worker, (http_pool, pkg.name),
                            callback=cb, cb_args=(pkg.name,)) for pkg in packages]
@@ -745,14 +745,26 @@ def parse_args():
                         help='Number of packages')
     packages.add_argument('-p', dest='packages', action='store',
                         help='List of packages (comma separated)')
+    parser.add_argument('-q', dest='quiet', action='count',
+                        help='Avoid flooding, use -qq for being even quieter')
     args = parser.parse_args()
     if not args.html and not args.json:
         parser.error('at least one of --html or --json (or both) is required')
     return args
 
 
+def log(lvl, *args, **kwargs):
+    '''
+    Print message depending on the log level.
+    Lower level means only print on more versbose log.LEVEL.
+    '''
+    if lvl > log.LEVEL:
+        print(*args, **kwargs)
+
+
 def __main__():
     args = parse_args()
+    log.LEVEL = args.quiet
     if args.packages:
         package_list = args.packages.split(",")
     else:
@@ -760,11 +772,11 @@ def __main__():
     date = datetime.datetime.utcnow()
     commit = subprocess.check_output(['git', 'log', 'master', '-n', '1',
                                       '--pretty=format:%H']).splitlines()[0]
-    print("Build package list ...")
+    log(2, "Build package list ...")
     packages = get_pkglist(args.npackages, package_list)
-    print("Getting package make info ...")
+    log(2, "Getting package make info ...")
     package_init_make_info()
-    print("Getting package details ...")
+    log(2, "Getting package details ...")
     for pkg in packages:
         pkg.set_infra()
         pkg.set_license()
@@ -773,17 +785,17 @@ def __main__():
         pkg.set_check_package_warnings()
         pkg.set_current_version()
         pkg.set_url()
-    print("Checking URL status")
+    log(2, "Checking URL status ...")
     check_package_urls(packages)
-    print("Getting latest versions ...")
+    log(2, "Getting latest versions ...")
     check_package_latest_version(packages)
-    print("Calculate stats")
+    log(2, "Calculate stats")
     stats = calculate_stats(packages)
     if args.html:
-        print("Write HTML")
+        log(2, "Write HTML")
         dump_html(packages, stats, date, commit, args.html)
     if args.json:
-        print("Write JSON")
+        log(2, "Write JSON")
         dump_json(packages, stats, date, commit, args.json)
 
 
Signature · 1 line
2.21.0
#7 lore raw

v2 cover Improve performances and feedback of different

In reply to Victor Huesca

Hello,

Thanks for this work on making pkg-stats faster, very nice!

Quoted 3 lines · On Fri, 19 Jul 2019 16:35:51 +0200 Victor Huesca <[email protected]>…

Victor Huesca (5):
support/scripts/pkg-stats: Use the 'multiprocess' fork instead of
'multiprocessing'

As said during our live discussion, I am not a big fan of using multiprocess instead of multiprocessing. multiprocessing is in the Python standard library, while multiprocess is an external module that isn't even packaged in Fedora. Considering that the main (only?) reason for using multiprocess over multiprocessing is simply to improve the script logging, I don't think it's worth it.

Quoted 4 lines

support/scripts/pkg-stats: retrieve packages latest version using
processes
support/scripts/pkg-stats: add current progress in 'check_url_status' support/scripts/pkg-stats: improve 'package_init_make_info'

I've however applied this particular patch, that is independent.

The other 4 patches are marked as Changes Requested.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com