Commit Graph

9 Commits

Author SHA1 Message Date
Dan Minor
aa6073b008 Bug 1239939 - [mozsystemmonitor] Reduce poll interval on exit r=wlach
Currently we poll at an interval of 1 second when shutting down
mozsystemmonitor. This causes a noticeable shutdown delay on short
running processes. Reducing the interval to 0.1 reduces this delay without
seeming to have any adverse effects.
2016-01-18 06:28:10 -05:00
Mike Shal
6729c538db Bug 1162594 - create build_resources.json even if psutil fails; r=ahal 2015-06-09 18:22:53 -04:00
Gregory Szorc
bda7f00f83 Bug 1116194 - Catch errors calling psutil; r=ted
The build system / mach currently has a very hacky virtualenv setup.
Essentially, it resorts to sys.path munging instead of a proper,
isolated environment.

During initialization, mach installs python/psutil in sys.path. Later
on, some code does an |import psutil|. This fails iff the psutil C
extension can't be found.

If there is a psutil C extension installed outside of mach and
python/psutil, |import psutil| may load it. The version mismatch isn't
detected until an extension-using psutil API is called. This has
manifested inside |mach build| via the resource monitor as an
|AttributeError: 'module' object has no attribute 'linux_sysinfo'|
exception during psutil.virtual_memory().

The proper fix for this is for the Python environment to ensure the
psutil C extension is built before attempting to import and use psutil.
Arguably, psutil itself should perform some kind of version check when
it imports the C extension to ensure things are in sync and fail at
import time.

Fixing mach and the build system Python environment to build psutil
earlier/properly is a long outstanding bug. It needs to be addressed.
But it is considerable effort. This patch continues the long history of
wallpapering over psutil import/run failures because using a proper
virutalenv from mach/build system is a lot of work. Sad panda.

--HG--
extra : rebase_source : 5c449d69c0fd907ea8359ac721ef6287baa4f10e
2014-12-29 12:06:21 -08:00
Mike Shal
2fe70240b6 Bug 1013730 - Have mach ignore broken disk io stats; r=gps
This works around the "RuntimeError: couldn't find any physical disk"
issue on Windows when using 'diskperf -n'
2014-10-01 13:14:58 -04:00
Chris Manchester
7949602ce3 Bug 1035006 - Fix pyflakes warnings in mozbase.;r=wlach 2014-07-07 14:51:34 -04:00
Gregory Szorc
85d9157008 Bug 907331 - Ability to convert resource usage to a serializable dict; r=ahal
--HG--
extra : rebase_source : b1e7f40e72ae50d1fde04a6935de17740f72c918
2014-05-23 14:08:04 -07:00
Gregory Szorc
273f9e99ae Bug 908296 - Catch all exceptions when importing psutil; r=ted
--HG--
extra : rebase_source : 7260ae283344fd8db3ef22923c33f9dc2166cc5f
2013-08-23 10:50:28 -07:00
Gregory Szorc
0a882e2210 Bug 907797 - Catch NotImplementedError when importing psutil; r=ahal 2013-08-21 09:56:36 -07:00
Gregory Szorc
7295431f2f Bug 883205 - Add mozsystemmonitor to mozbase; r=ahal 2013-06-14 15:15:58 -07:00