NAME
Test::AutoBuild::Stage::SetNice - Alter the scheduling priority of builder
SYNOPSIS
use Test::AutoBuild::Stage::SetNice
DESCRIPTION
This module provides the ability to alter the scheduling priority of the build process, typically lowering it to avoid monopolising all the resources of the host machine. This is analogous to launching the builder process through the nice(1) command.
CONFIGURATION
In addition to the standard parameters defined by the Test::AutoBuild::Stage module, this module accepts one entry in the options
parameter:
- nice-level
-
An integer in the range -20 (highest priority) to 19 (lowest priority) indicating what schedular priority to give to the builder. NB, typically you will be unable to set a priority less than zero, since the builder does not run as root. If omitted, the default value is 19 to ensure lowest priority is taken.
EXAMPLE
{
name = renice
label = Set Process Priority
module = Test::AutoBuild::Stage::SetNice
critical = 0
options = {
nice-level = 19
}
}
METHODS
- $stage->init(%params);
-
Override super class to initialize the default nice level if non was specified. It is not neccesary to call this method since it is called automatically by the
new
method. - $stage->process($runtime);
-
Attempt to change the priority of the builder process according to the
nice-level
option. If unsuccessful, marks the stage as havingfailed
. Since this is a recoverable error, it is usual to set this stage as non-critical.
AUTHORS
Daniel Berrange <dan@berrange.com> Dennis Gregorovic <dgregorovic@alum.mit.edu>
COPYRIGHT
Copyright (C) 2004 Red Hat, Inc.
SEE ALSO
perl(1)
, Test::AutoBuild::Stage