Files
palemoon27/python/psutil/TODO
T
roytam1 98894236c9 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1171200 - Add means of checking if a document links to a manifest. r=billm (066ddad20)
- Bug 1167300 - Consolidate the performance tool directory, r=jsantell (c7dd7dc34)
- Bug 1167300 - Create a way to get strings from multiple localization files, r=jsantell (0973b8d3e)
- modules not in gre (914e4080e)
- Bug 1153011 - Remove zoom button from call tree. r=vporof (797b8f91d)
- Bug 1151973 - Inverted call tree should be ordered by 'self cost', not 'total cost', r=jsantell (f2800b272)
- more gre removal (27aed87a0)
- Bug 1144034 - Flamegraph text is barely readable on non-retina display, r=jsantell (cb19fd9f2)
- Bug 1151973 - Inverted call tree should be ordered by 'self cost', not 'total cost', r=jsantell (9c579599e)
- Bug 1167300 - Fix all performance tool imports to work with the new file locations, r=jsantell (70b2995c4)
- Bug 1167298 - Remove the ordinal property on categories, r=jsantell (00b3f5830)
- Bug 1167733 - Consolidate prefs access and usage in the new performance tool, r=jsantell (4dab15e7f)
- Bug 1167006 - part 3 fully revert merge from 780e1f999f54. (8aaa33c9c)
- Bug 1167961 - Task is incorrectly used in compatibility.js, r=jsantell (7291f68d1)
- Bug 1138641 - Updated remaining callsites to use newChannel2 in browser/devtools (r=vporof) (60ac4b2c8)
- Bug 1164130 - Correctly include RecordingUtils when importing older version 2 profiler data. r=vp (8169d0398)
- Bug 1167962 - Keep exports at bottom of modules, r=jsantell (7426919db)
- Bug 1167962 - Fix import in synthesizeProfileForTest, r=orange (cc7fab771)
- fix merge of later patch Bug 1167006 (c0b57b0e2)
- Bug 1157523 - Fix intermittent where markers are selected in the waterfall views when there is no recording selected. r=vp (35cec0bd1)
- Bug 1196253 - update in-tree psutil to 3.1.1. r=gps (80f243738)
2021-05-26 11:17:55 +08:00

168 lines
5.4 KiB
Plaintext

TODO
====
A collection of ideas and notes about stuff to implement in future versions.
"#NNN" occurrences refer to bug tracker issues at:
https://github.com/giampaolo/psutil/issues
HIGHER PRIORITY
===============
* OpenBSD support.
* #371: CPU temperature (apparently OSX and Linux only; on Linux it requires
lm-sensors lib).
* #269: expose network ifaces RX/TW queues. This should probably go into
net_if_stats(). Figure out on what platforms this is supported:
Linux: yes
Others: ?
* Process.threads(): thread names; patch for OSX available at:
https://code.google.com/p/plcrashreporter/issues/detail?id=65
* Asynchronous psutil.Popen (see http://bugs.python.org/issue1191964)
* (Windows) fall back on using WMIC for Process methods returning AccessDenied
* #613: thread names.
* #604: emulate os.getloadavg() on Windows
* #269: NIC rx/tx queue.
LOWER PRIORITY
==============
* #355: Android support.
* #276: GNU/Hurd support.
* #429: NetBSD support.
* DragonFlyBSD support?
* AIX support?
* examples/taskmgr-gui.py (using tk).
* system-wide number of open file descriptors:
* https://jira.hyperic.com/browse/SIGAR-30
* http://www.netadmintools.com/part295.html
* Number of system threads.
* Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/ms684824(v=vs.85).aspx
* #357: what CPU a process is on.
* Doc / wiki which compares similarities between UNIX cli tools and psutil.
Example:
df -a -> psutil.disk_partitions
lsof -> psutil.Process.open_files() and psutil.Process.open_connections()
killall-> (actual script)
tty -> psutil.Process.terminal()
who -> psutil.users()
DEBATABLE
=========
* psutil.proc_tree() something which obtains a {pid:ppid, ...} dict for
all running processes in one shot. This can be factored out from
Process.children() and exposed as a first class function.
PROS: on Windows we can take advantage of _psutil_windows.ppid_map()
which is faster than iterating over all pids and calling ppid().
CONS: examples/pstree.py shows this can be easily done in the user code
so maybe it's not worth the addition.
* advanced cmdline interface exposing the whole API and providing different
kind of outputs (e.g. pprinted, colorized, json).
* [Linux]: process cgroups (http://en.wikipedia.org/wiki/Cgroups). They look
similar to prlimit() in terms of functionality but uglier (they should allow
limiting per-process network IO resources though, which is great). Needs
further reading.
* Should we expose OS constants (psutil.WINDOWS, psutil.OSX etc.)?
* Python 3.3. exposed different sched.h functions:
http://docs.python.org/dev/whatsnew/3.3.html#os
http://bugs.python.org/issue12655
http://docs.python.org/dev/library/os.html#interface-to-the-scheduler
It might be worth to take a look and figure out whether we can include some
of those in psutil.
Also, we can probably reimplement wait_pid() on POSIX which is currently
implemented as a busy-loop.
* Certain systems provide CPU times about process children. On those systems
Process.cpu_times() might return a (user, system, user_children,
system_children) ntuple.
* Linux: /proc/{PID}/stat
* Solaris: pr_cutime and pr_cstime
* FreeBSD: none
* OSX: none
* Windows: none
* ...also, os.times() provides 'elapsed' times as well.
* ...also Linux provides guest_time and cguest_time.
* Enrich exception classes hierarchy on Python >= 3.3 / post PEP-3151 so that:
- NoSuchProcess inherits from ProcessLookupError
- AccessDenied inherits from PermissionError
- TimeoutExpired inherits from TimeoutError (debatable)
See: http://docs.python.org/3/library/exceptions.html#os-exceptions
* Process.threads() might grow an extra "id" parameter so that it can be
used as such:
>>> p = psutil.Process(os.getpid())
>>> p.threads(id=psutil.current_thread_id())
thread(id=2539, user_time=0.03, system_time=0.02)
>>>
Note: this leads to questions such as "should we have a custom NoSuchThread
exception? Also see issue #418.
Note #2: this would work with os.getpid() only.
psutil.current_thread_id() might be desirable as per issue #418 though.
* should psutil.TimeoutExpired exception have a 'msg' kwarg similar to
NoSuchProcess and AccessDenied? Not that we need it, but currently we
cannot raise a TimeoutExpired exception with a specific error string.
* process_iter() might grow an "attrs" parameter similar to Process.as_dict()
invoke the necessary methods and include the results into a "cache"
attribute attached to the returned Process instances so that one can avoid
catching NSP and AccessDenied:
for p in process_iter(attrs=['cpu_percent']):
print(p.cache['cpu_percent'])
This also leads questions as whether we should introduce a sorting order.
* round Process.memory_percent() result?
* #550: number of threads per core.
* Have psutil.Process().cpu_affinity([]) be an alias for "all CPUs"?
COMPATIBILITY BREAKAGE
======================
Removals (will likely happen in 2.2):
* (S) psutil.Process.nice (deprecated in 0.5.0)
* (S) get_process_list (deprecated in 0.5.0)
* (S) psutil.*mem* functions (deprecated in 0.3.0 and 0.6.0)
* (M) psutil.network_io_counters (deprecated in 1.0.0)
* (M) local_address and remote_address Process.connection() namedtuple fields
(deprecated in 1.0.0)
REJECTED IDEAS
==============
STUB