projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fio: capture thread status display
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index c794d9b1495d14c83eb8ec4f8ba7f70251552791..1b7dee66cb2f424afb29f07e225dbdc77c26af93 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-21,6
+21,8
@@
#include "flist.h"
#include "hash.h"
#include "flist.h"
#include "hash.h"
+extern void (*update_thread_status)(char *status_message);
+
struct client_eta {
struct jobs_eta eta;
unsigned int pending;
struct client_eta {
struct jobs_eta eta;
unsigned int pending;
@@
-88,6
+90,7
@@
struct client_ops fio_client_ops = {
handle_gs,
handle_eta,
handle_probe,
handle_gs,
handle_eta,
handle_probe,
+ NULL, /* status display, if NULL, printf is used */
};
static struct timeval eta_tv;
};
static struct timeval eta_tv;
@@
-1015,6
+1018,9
@@
int fio_handle_clients(struct client_ops *ops)
init_thread_stat(&client_ts);
init_group_run_stat(&client_gs);
init_thread_stat(&client_ts);
init_group_run_stat(&client_gs);
+ /* Used by eta.c:display_thread_status() */
+ update_thread_status = ops->thread_status_display;
+
while (!exit_backend && nr_clients) {
struct flist_head *entry, *tmp;
struct fio_client *client;
while (!exit_backend && nr_clients) {
struct flist_head *entry, *tmp;
struct fio_client *client;