1Test::AutoBuild::Stage:U:sSeertNCiocnet(r3i)buted Perl DToecsutm:e:nAtuattoiBounild::Stage::SetNice(3)
2
3
4
6 Test::AutoBuild::Stage::SetNice - Alter the scheduling priority of
7 builder
8
10 use Test::AutoBuild::Stage::SetNice
11
13 This module provides the ability to alter the scheduling priority of
14 the build process, typically lowering it to avoid monopolising all the
15 resources of the host machine. This is analogous to launching the
16 builder process through the nice(1) command.
17
19 In addition to the standard parameters defined by the
20 Test::AutoBuild::Stage module, this module accepts one entry in the
21 "options" parameter:
22
23 nice-level
24 An integer in the range -20 (highest priority) to 19 (lowest
25 priority) indicating what schedular priority to give to the
26 builder. NB, typically you will be unable to set a priority less
27 than zero, since the builder does not run as root. If omitted, the
28 default value is 19 to ensure lowest priority is taken.
29
30 EXAMPLE
31 {
32 name = renice
33 label = Set Process Priority
34 module = Test::AutoBuild::Stage::SetNice
35 critical = 0
36 options = {
37 nice-level = 19
38 }
39 }
40
42 $stage->init(%params);
43 Override super class to initialize the default nice level if non
44 was specified. It is not neccesary to call this method since it is
45 called automatically by the "new" method.
46
47 $stage->process($runtime);
48 Attempt to change the priority of the builder process according to
49 the "nice-level" option. If unsuccessful, marks the stage as having
50 "failed". Since this is a recoverable error, it is usual to set
51 this stage as non-critical.
52
54 Daniel Berrange <dan@berrange.com> Dennis Gregorovic
55 <dgregorovic@alum.mit.edu>
56
58 Copyright (C) 2004 Red Hat, Inc.
59
61 perl(1), Test::AutoBuild::Stage
62
63
64
65perl v5.12.1 2007-12-08Test::AutoBuild::Stage::SetNice(3)