Skip to content

Commit

Permalink
bug 1512499 - handle psutil returning None for physical_cores. r=froydnj
Browse files Browse the repository at this point in the history
psutil has a bug on arm systems where it will return None for physical_cores:
giampaolo/psutil#1359

This causes us to generate invalid telemetry data which raises an error. Fix
this by simply omitting the field in this case.

Differential Revision: https://phabricator.services.mozilla.com/D14969

UltraBlame original commit: be66f8877e465637de546fd3a94a55009e74f973
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent 619391e commit 7a4b1cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/mozbuild/mozbuild/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def get_system_info():
import psutil

info['logical_cores'] = psutil.cpu_count()
info['physical_cores'] = psutil.cpu_count(logical=False)
physical_cores = psutil.cpu_count(logical=False)
if physical_cores is not None:
info['physical_cores'] = physical_cores



Expand Down

0 comments on commit 7a4b1cc

Please sign in to comment.