summaryrefslogtreecommitdiffstats
path: root/src/build.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-04-28 17:56:38 (GMT)
committerEvan Martin <martine@danga.com>2012-04-28 17:56:38 (GMT)
commit3e9cb5d72ae6ea6faab4b7bdb7781d130590e799 (patch)
tree441e526ad70f5c6c8e8afedb8fc50ed9981c6589 /src/build.h
parent8066c2d1bb5821077450755d774121e0205cb790 (diff)
parentb50f7d1f30991998564f62aa717862efb7555044 (diff)
downloadNinja-3e9cb5d72ae6ea6faab4b7bdb7781d130590e799.zip
Ninja-3e9cb5d72ae6ea6faab4b7bdb7781d130590e799.tar.gz
Ninja-3e9cb5d72ae6ea6faab4b7bdb7781d130590e799.tar.bz2
Merge pull request #274 from polrop/max_load_average
Max load average
Diffstat (limited to 'src/build.h')
-rw-r--r--src/build.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/build.h b/src/build.h
index c0328f3..407aecc 100644
--- a/src/build.h
+++ b/src/build.h
@@ -99,7 +99,7 @@ struct CommandRunner {
/// Options (e.g. verbosity, parallelism) passed to a build.
struct BuildConfig {
BuildConfig() : verbosity(NORMAL), dry_run(false), parallelism(1),
- failures_allowed(1) {}
+ failures_allowed(1), max_load_average(-0.0f) {}
enum Verbosity {
NORMAL,
@@ -110,6 +110,9 @@ struct BuildConfig {
bool dry_run;
int parallelism;
int failures_allowed;
+ /// The maximum load average we must not exceed. A negative value
+ /// means that we do not have any limit.
+ double max_load_average;
};
/// Builder wraps the build process: starting commands, updating status.