projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
thread cpu resource statistics bug fix
[fio.git]
/
stat.c
diff --git
a/stat.c
b/stat.c
index d041ef3c0bb56c770334d551061824113c8b5b2d..af6e1f2efe9a6864137e5600d2520f754863ae70 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-16,7
+16,11
@@
void update_rusage_stat(struct thread_data *td)
{
struct thread_stat *ts = &td->ts;
+#ifdef FIO_HAVE_RUSAGE_THREAD
+ getrusage(RUSAGE_THREAD, &td->ru_end);
+#else
getrusage(RUSAGE_SELF, &td->ru_end);
+#endif
ts->usr_time += mtime_since(&td->ru_start.ru_utime,
&td->ru_end.ru_utime);