mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
(procfs_system_process_attributes): Multiply `pcpu' by 100, so it's in
percents as advertised.
This commit is contained in:
parent
60aff9248a
commit
b63a740b3b
2 changed files with 8 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2008-10-02 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* process.c (procfs_system_process_attributes): Multiply `pcpu' by
|
||||
100, so it's in percents as advertised.
|
||||
|
||||
2008-10-02 Adrian Robert <Adrian.B.Robert@gmail.com>
|
||||
|
||||
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)
|
||||
|
|
|
|||
|
|
@ -7404,7 +7404,9 @@ procfs_system_process_attributes (pid)
|
|||
attrs);
|
||||
time_from_jiffies (utime + stime, clocks_per_sec, &sec, &usec);
|
||||
pcpu = (sec + usec / 1000000.0) / (EMACS_SECS (telapsed) + EMACS_USECS (telapsed) / 1000000.0);
|
||||
attrs = Fcons (Fcons (Qpcpu, make_float (pcpu)), attrs);
|
||||
if (pcpu > 1.0)
|
||||
pcpu = 1.0;
|
||||
attrs = Fcons (Fcons (Qpcpu, make_float (100 * pcpu)), attrs);
|
||||
pmem = 4.0 * 100 * rss / procfs_get_total_memory ();
|
||||
if (pmem > 100)
|
||||
pmem = 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue