mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:54:14 +08:00
mdbx-test: fix rusage for single-mode.
Change-Id: Id1928ad6061306b4d85f38cd296e172615d92741
This commit is contained in:
parent
c00f484813
commit
f008876a93
@ -596,7 +596,7 @@ int main(int argc, char *const argv[]) {
|
||||
|
||||
#if !(defined(_WIN32) || defined(_WIN64))
|
||||
struct rusage spent;
|
||||
if (getrusage(RUSAGE_CHILDREN, &spent) == 0) {
|
||||
if (!getrusage(global::singlemode ? RUSAGE_SELF : RUSAGE_CHILDREN, &spent)) {
|
||||
log_notice("%6s: user %f, system %f", "CPU",
|
||||
spent.ru_utime.tv_sec + spent.ru_utime.tv_usec * 1e-6,
|
||||
spent.ru_stime.tv_sec + spent.ru_stime.tv_usec * 1e-6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user