SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Proc-NiceSleep rpm build for : openSUSE Tumbleweed. For other distributions click perl-Proc-NiceSleep.

Name : perl-Proc-NiceSleep
Version : 0.91 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 1.49 Date : 2024-08-05 18:40:58
Group : Development/Libraries/Perl Source RPM : perl-Proc-NiceSleep-0.91-1.49.src.rpm
Size : 0.06 MB
Packager : (none)
Summary : yield system in an intelligent fashion
Description :
Proc::NiceSleep defines subroutines to allow a process to yield use of the
system according to a configured policy.

Proc::NiceSleep is intended for use in situations where the operating
system does not support priorities, or where using the operating system\'s
built-in priorities does not yield the system sufficiently.

By default Proc::NiceSleep expects to yield the process for one tenth the
amount of time that process runs. This is expressed by the default Sleep
Factor of 0.10 and can be set via sleep_factor( $n ).

Proc::NiceSleep can also be configured to attempt to keep the average
system load below a certain threshhold through use of the max_load()
function.

A convenient nice() function, which acts much like the shell command and
executable of the same name, is also provided for easy, platform
independent access to your system\'s priorities (if available).

If Proc::NiceSleep autodetects the presence of the Time::HiRes module (and
your operating system supports it) then timing and yielding operations will
occur with sub-second granularity. If not, no warning or error will be
issued but Proc::NiceSleep operations will occur with a granularity of
about one second. Sys::CpuLoad must be found for max_load() to have any
effect.

The following functions can be imported from this module.

* maybe_sleep ()

Checks to see if this process should yield use of the system by issuing
some kind of sleep at this point, and if so, does so for an appropriate
amount of time. Returns 0 if no sleep was performed, otherwise returns the
amount of seconds maybe_sleep() actually slept for.

* maybe_sleep ( $maxsleeptime )

Calls maybe_sleep() until it returns 0 or $maxsleeptime has passed. Returns
the sum of the times maybe_sleep() slept.

* max_load ( $max_load )

Set or gets the maximum 1-minute average load allowed to occur before a
sleep call will be issued by maybe_sleep(), depending on whether a
parameter is passed or not. The default value of 0 disables this feature;
setting the maximum load will only have an effect if Sys::CpuLoad is
successfully loaded (or an alternate load retrieval function is provided
through load_function()). This module will check the system load no more
than about once per second. If both sleep_factor() and max_load() are used
then maybe_sleep() will yield the system if either condition is met.

* sleep_factor ( $factor )

Sets or gets the sleep factor depending on whether a number is passed or
not. A sleep factor of 1 means to sleep an equal amount of time as we run,
2 means to sleep twice as long, and so on. The default value is 0.1. If the
sleep factor is set to zero, then this feature is disabled. If both
sleep_factor() and max_load() are used then maybe_sleep() will yield the
system if either condition is met.

* nice ()

Sets or gets the priority of the process, as understood by the operating
system. If passed an integer, nice() attempts to set priority of the
process to the value specified, and returns that value. If no parameter is
passed, nice() attempts to query the operating system for the priority of
the process and return it. If your OS doesn\'t support priorities then
nice() will likely have no effect and always return 0.

The exact nice() values returned and recognized, and their meanings to the
system, are system dependent but usually range from about -20 (highest
priority) to 20 (lowest priority, \'nicest\').

* min_run_time ()

Sets or gets the minimum run time, in seconds, depending on whether a
number is passed or not. The minumum run time is the least amount of time
that Proc::NiceSleep will allow the process to run between sleeps. The
default value is 0 seconds.

* min_sleep_time ()

Sets or gets the minimum amount time, in seconds, that maybe_sleep() will
sleep for if it detects that a sleep is appropriate. The default it 0.

* over_load_min_sleep_time ()

Sets or gets the minimum amount time, in seconds, that maybe_sleep() will
sleep when the load has gone above the max_load(). The default is 3.5
seconds.

* over_load_sleep_drift ()

Sets or gets the \'drift\' in the amount time, that maybe_sleep() will sleep
when the load has gone above the value set with max_load(). The actual
amount of time chosen to sleep will be between over_load_min_sleep_time()
and over_load_min_sleep_time() + ( 4 * (curload - targetload) *
over_load_sleep_drift() ) seconds (that is, it will sleep longer as the
system load goes up.) The default is over_load_sleep_drift is 1.

* load_function( \\&function )

Sets or gets a reference to a function to be used by maybe_sleep() that
returns numbers that should be considered the 1, 5, and 15-minute average
system loads. (Only the 1-minute average is used). Set to undef (the
default) to use your system\'s load.

* reset_all ()

Resets the internal statistics to act as if the process had just started.

* DumpText ()

Returns a string (intended for display) containing multiple lines with
internal information about Proc::NiceSleep\'s runtime configuration and
statistics. The format and contents of the returned string are intended for
informational and debugging use and are subject to change.

* Dump ()

Returns a reference to a hash with internal information about
Proc::NiceSleep configuration and statistics. The names and presence of the
returned hash names and values are for informational and debugging purposes
only and are subject to change. Modifying the returned hash will have no
effect on the operation of Proc::NiceSleep.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-P/openSUSE_Tumbleweed/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Proc-NiceSleep-0.91-1.49.noarch.rpm
     

Provides :
perl(Proc::NiceSleep)
perl-Proc-NiceSleep

Requires :
perl(:MODULE_COMPAT_5.40.0)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.40.0/Proc
/usr/lib/perl5/vendor_perl/5.40.0/Proc/NiceSleep.pm
/usr/share/doc/packages/perl-Proc-NiceSleep
/usr/share/doc/packages/perl-Proc-NiceSleep/ChangeLog
/usr/share/doc/packages/perl-Proc-NiceSleep/Changes
/usr/share/doc/packages/perl-Proc-NiceSleep/README
/usr/share/doc/packages/perl-Proc-NiceSleep/examples
/usr/share/doc/packages/perl-Proc-NiceSleep/examples/example1.pl
/usr/share/doc/packages/perl-Proc-NiceSleep/examples/example2.pl
/usr/share/doc/packages/perl-Proc-NiceSleep/examples/example3.pl
/usr/share/licenses/perl-Proc-NiceSleep
/usr/share/licenses/perl-Proc-NiceSleep/LICENSE
/usr/share/man/man3/Proc::NiceSleep.3pm.gz

 
ICM