| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This makes this implementation more consisten with POSIX load avarage.
|
| |
|
|
|
|
|
|
|
| |
Added code to gracefully handle:
1. Call to CalculateProcessorLoad with not incremented ticks (fast calls
to GetSystemTimes can result same results),
2. Smooth/filter load estimation for consecutive calls.
|
|
|
|
|
| |
- Fixed bad logic condition,
- Added comment to clarify
|
|
|
|
|
| |
Inspired by:
http://stackoverflow.com/questions/23143693/retrieving-cpu-load-percent-total-in-windows-with-c
|
|
|
|
|
|
| |
Due to #690, file.c++ used to be escaped. + seems as safe as -, so allow
it to not be escaped, to keep compile command lines with a fairly common
extension slightly cleaner.
|
|
|
|
| |
Under ::CommandLineToArgvW() rules, the backslash character only gets special treatment if it’s immediately followed by a double quote. So, when checking to see if a string needs Win32 escaping, it’s sufficient to check for the presence of a double quote character. This allows paths like "foo\bar" to be recognised as “sensible” paths, which don’t require the full escaping.
|
|
|
|
|
|
| |
In summary: don’t escape if the path doesn’t contain problematic characters, otherwise:
- Shell: enclose string in single quotes, escape embedded single quotes with the magic quote-backslash-quote sequence
- Win32: Escape double quotes by doubling the number of consecutive backslashes that precede them (if any) and adding one more. Finally, double the number of trailing backslashes, and enclose the whole thing in double quotes.
|
|
|
|
|
|
|
|
|
| |
The current implementation is unnecessarily complex, because:
- The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN)
in terms of sysctl({CTL_HW,HW_NCPU}).
- get_nprocs() is a GNU extension, and glibc implements
sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().
|
|
|
|
| |
Should fix issue #584.
|
| |
|
| |
|
| |
|
|
|
|
| |
Hopefully fixes the build on Windows.
|
|
|
|
|
|
| |
This fixes:
src/util.cc: In function 'double GetLoadAverage()':
src/util.cc:337:28: error: 'getloadavg' was not declared in this scope
|
|
|
|
|
|
|
|
|
|
|
|
| |
ninja-build does not build on non-Linux archs, such as
GNU/kFreeBSD and GNU/Hurd.
The problem is that the GetProcessorCount() implementation for these
architectures is the sysconf() one, but <unistd.h> has not been
included, causing sysconf() and _SC_NPROCESSORS_ONLN to not be
declared. Another solution (which is the one I chose) is to make use
of the "linux" implementation which uses get_nprocs(), which is a GNU
extension and thus available for anything using GNU libc.
|
|
|
|
| |
Change-Id: Idb1ce67a320a9819de262d83b498ee10eb362ed2
|
| |
|
|\
| |
| | |
on windows a network path starts with two backslashes
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
Fixes issue #392 (didn't handle creating nested build dirs right).
Moves MakeDir out of util.h; all code should go through
DiskInterface to simplify testing. Moves ownership of the
DiskInterface into the client of the Builder, which also allows
removing some code that reached inside the object as well as
a minor leak.
|
|\
| |
| |
| |
| | |
Conflicts:
src/util.cc
|
| | |
|
| | |
|
| |
| |
| |
| | |
Filed issue #386 about it too.
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
(This likely doesn't compile, just getting all the history in place.)
Conflicts:
src/util.cc
|
| |
| |
| |
| | |
happily
|
| | |
|
|\ \
| | |
| | | |
print edges per second
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
prints the rate of finished edges per second to the console,
for instance with NINJA_STATUS="[%s/%t %o(%c)/s] ":
[132/1922 16.1(14)/s]
16.1 is the average for all processed files (here 132 since start)
14 is the average of the last n files while n is the number specifies by
-j (or its default)
|
|/ /
| |
| |
| |
| |
| | |
https://github.com/martine/ninja/issues/360
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
| | |
|
| |
| |
| |
| | |
-> 170ms).
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This is similar to GNU make -l/--load-average option. It limits the number
of job started if the load average exceed the given value. It can be very
useful when running ninja on a continuous integration server where we want
to use parallelism as much as possible without overloading the server.
|
|/ |
|
| |
|
|
|
|
| |
From a patch from Peter Kuemmel <syntheticpp@gmx.net>.
|