summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* adjust flake8memleak-fluctuationGiampaolo Rodola2020-05-122-12/+17
|
* fun full timesGiampaolo Rodola2020-05-101-3/+2
|
* adjust logicGiampaolo Rodola2020-05-101-28/+21
|
* disable gcGiampaolo Rodola2020-05-091-32/+24
|
* progressGiampaolo Rodola2020-05-092-7/+13
|
* implement fluctuation logicGiampaolo Rodola2020-05-072-38/+28
|
* Add new TestFdsLeak test class (#1752)Giampaolo Rodola2020-05-067-66/+162
|
* Windows: refactor proc username(), split it in 2 functionsGiampaolo Rodola2020-05-052-54/+59
|
* fix some memleak tests on winGiampaolo Rodola2020-05-054-9/+29
|
* have mem leak test class check num of fds/handlesGiampaolo Rodola2020-05-043-47/+43
|
* Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2020-05-048-285/+419
|\
| * Refactor tests calling all process methods (process_namespace class) (#1749)Giampaolo Rodola2020-05-049-299/+430
| | | | | | Over the years I have accumulated different unit-tests which use dir() to get all process methods and test them in different circumstances. This produced a lot of code duplication. With this PR I introduce 2 new test classes (process_namespace and system_namespace) which declare all the method names and arguments in a single place, removing a lot cruft and code duplication.
* | update READMEGiampaolo Rodola2020-05-031-14/+11
|/
* Process wait() improvements (#1747)Giampaolo Rodola2020-05-0312-159/+306
| | | | | | | | | | | | | | | | | | | | | | * `Process.wait()` on POSIX now returns an `enum` showing the negative which was used to terminate the process: ```python >>> import psutil >>> p = psutil.Process(9891) >>> p.terminate() >>> p.wait() <Negsignal.SIGTERM: -15> ``` * the return value is cached so that the exit code can be retrieved on then next call, mimicking `subprocess.Popen.wait()` * `Process` object provides more `status` and `exitcode` additional info on `str()` and `repr()`: ``` >>> proc psutil.Process(pid=12739, name='python3', status='terminated', exitcode=<Negsigs.SIGTERM: -15>, started='15:08:20') ``` Extra: * improved `wait()` doc * reverted #1736: `psutil.Popen` uses original `subprocess.Popen.wait` method (safer)
* Parallelize fetch all processes tests with proc pool (#1746)Giampaolo Rodola2020-05-021-114/+103
| | | | | | | | | | | | | | | | | | | | | | | | Despite I recently implemented parallel tests on UNIX (#1709), TestFetchAllProcesses class is the slowest one to run because it gets all possible info for all processes in one go. In fact it's a singe unit-test, so it's not parallelized by the test runner. In here I used multiprocessing.Pool to do the trick. On my main linux box (8 cores): Before: ---------------------------------------------------------------------- Ran 1 test in 2.511s After: ---------------------------------------------------------------------- Ran 1 test in 0.931s On Windows (virtualized, 4 cores): Before: ---------------------------------------------------------------------- Ran 1 test in 13.752s After: ---------------------------------------------------------------------- Ran 1 test in 3.951s
* cleanup psutil mod namespace a bitGiampaolo Rodola2020-05-011-21/+18
|
* refactor signal testsGiampaolo Rodola2020-05-011-50/+38
|
* fix AttributeErrorGiampaolo Rodola2020-05-011-2/+8
|
* Refactor process test utils methods (#1745)Giampaolo Rodola2020-05-0111-178/+151
| | | ...in order to accomodate Cygwin implementation.
* Drastically improve "make test/build" speed.Giampaolo Rodola2020-05-014-39/+39
| | | | | | | Doing "make install" before any test is slow and not really necessary. Instead do "make build", and remove the part import setuptools and test psutil can be imported (do that in make install instead). This way I went down from 0.8 secs (install phase before starting the test) to 0.3 secs!
* Revert #1736: Popen inheriting from subprocess (#1744)Giampaolo Rodola2020-05-015-112/+69
|
* Per-test file cleanup and new PsutilTestCase (#1743)Giampaolo Rodola2020-04-3018-269/+262
| | | | | Test files/dirs are now removed after each test. when invoked via self.get_testfn(). Until now test files were stored in a global variable and were removed at process exit, via atexit.register(), but this didn't work with parallel tests because the fork()ed workers use os._exit(0), preventing cleanup functions to run. All test classes now inherit from PsutilTestCase class, which provides the most important methods requiring an automatic cleanup (get_test_subprocess() and others).
* Merge branch 'test-runner-refact'Giampaolo Rodola2020-04-303-151/+159
|\
| * See: #1709: allow per-test parallelizationGiampaolo Rodola2020-04-308-170/+187
| | | | | | | | | | | | | | | | Refactor test runner.py with a saner unittest-based class hierarchy so that --parallel args affects all test suites (all, by-name, failed). Also change Makefile which now can be used like this: make test-process ARGS=--parallel
* | Parallel build (#1741)Giampaolo Rodola2020-04-306-19/+28
|/
* refactoring / rename varsGiampaolo Rodola2020-04-291-12/+10
|
* Test sub-processes cleanup and ProcessTestCase class (#1739)Giampaolo Rodola2020-04-2812-215/+260
|
* show status() in __repr__Giampaolo Rodola2020-04-283-20/+24
|
* create_zombie_proc() make it return parent so that we can kill zombieGiampaolo Rodola2020-04-284-19/+27
|
* psutil.Popen: inherit from subprocess + support wait(timeout=...) parameter ↵Giampaolo Rodola2020-04-288-60/+99
| | | | (#1736)
* add new termina() test utilGiampaolo Rodola2020-04-271-56/+73
|
* Merge branch 'master' into devreap-childrenGiampaolo Rodola2020-04-2625-134/+315
|\
| * Parallel tests (UNIX) (#1709)Giampaolo Rodola2020-04-2625-134/+315
| |
* | rename varGiampaolo Rodola2020-04-265-45/+45
|/
* trick to execute atexit functions in case of SIGTERMGiampaolo Rodola2020-04-251-21/+34
|
* Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2020-04-2410-355/+300
|\
| * Get rid of TESTFN global variable (#1734)Giampaolo Rodola2020-04-2410-355/+300
| |
* | Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2020-04-246-30/+111
|\ \ | |/
| * Backport python 3 super() (#1733)Giampaolo Rodola2020-04-247-34/+112
| |
* | skip scripts test if can't locate directoryGiampaolo Rodola2020-04-241-4/+1
|/ | | | | May happen on CI and when running tests via "python -m psutil.tests" since scripts dir is not installed.
* Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2020-04-2312-443/+572
|\
| * MemoryLeakTest class enhancements (#1731)Giampaolo Rodola2020-04-2313-442/+586
| |
| * Remove useless assignment (#1728)kaiix2020-04-161-1/+0
| |
* | Merge branch 'master' of github.com:giampaolo/psutilGiampaolo Rodola2020-04-154-4/+4
|\ \ | |/
| * Fix handling /proc/cpuinfo without tabs (#1726)Michał Górny2020-04-141-1/+1
| | | | | | | | | | | | | | /proc/cpuinfo uses spaces rather than tabs on ia64. Since there seems not to be any reason to require specific kind of whitespace before ':' on 'cpu mhz' line, just split on ':'. See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/ia64/kernel/setup.c#n700
| * Fixup release date (#1716)Andrey Babak2020-03-141-1/+1
| |
| * sensors_fans is not available on MacOS (#1710)crusaderky2020-03-042-2/+2
| |
* | update HISTORY/CREDITSGiampaolo Rodola2020-04-142-0/+14
|/
* Fix detecting empty result in TestSystemAPIs.test_users() (#1699)Michał Górny2020-02-211-2/+2
|
* Git hook for renamed/added/deleted files + flake8 print() + tidelift (#1704)Giampaolo Rodola2020-02-2116-173/+230
|