Recent changes (master)
The following changes since commit bb661c4027e5a0482b9fcc1c1b4e7e918650ee72:
Fio 3.9 (2018-09-06 09:07:55 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 2eca48926723d3ebe8f43d4999302fb826f4a250:
client: cleanup output types (2018-09-07 15:59:51 -0600)
----------------------------------------------------------------
Jens Axboe (9):
Collect startup output before logging it
client: use temp buffer for client text output
log: use __log_buf() if we know buf != NULL
init: use __log_buf() if we know buf != NULL
log: remember to free output buffer when done
Revert "client: respect terse output on client <--> backend relationship"
client: use temp buffer for single output flush for json/disk util
client: switch to per-client buffer
client: cleanup output types
backend.c | 16 +++++++----- client.c | 90 +++++++++++++++++++++++++++++++++++---------------------------- client.h | 2 ++ init.c | 12 ++++++--- stat.c | 2 -- 5 files changed, 70 insertions(+), 52 deletions(-)
---
Diff of recent changes:
backend.c +10 -6
@@ -2213,18 +2213,22 @@ static void run_threads(struct sk_out *sk_out) }if (output_format &FIO_OUTPUT_NORMAL ) { -log_info ("Starting " ); +struct buf_output out; + +buf_output_init (&out); +__log_buf (&out,"Starting " );if (nr_thread) -log_info ("%d thread%s" , nr_thread, +__log_buf (&out,"%d thread%s" , nr_thread, nr_thread >1 ?"s" :"" );if (nr_process) {if (nr_thread) -log_info (" and " ); -log_info ("%d process%s" , nr_process, +__log_buf (&out," and " ); +__log_buf (&out,"%d process%s" , nr_process, nr_process >1 ?"es" :"" ); } -log_info ("\n" ); -log_info_flush (); +__log_buf (&out,"\n" ); +log_info_buf (out.buf, out.buflen); +buf_output_free (&out); } todo = thread_number;
client.c +50 -40
185 lines not on this page · raw message
client.h +2 -0
@@ -74,6 +74,8 @@ struct fio_client {struct client_file *files;unsigned int nr_files; + +struct buf_output buf; };typedef void (client_cmd_op )(struct fio_client *,struct fio_net_cmd *);
init.c +8 -4
@@ -1681,6 +1681,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,char *c1, *c2, *c3, *c4;char *c5 =NULL , *c6 =NULL ;int i2p =is_power_of_2 (o->kb_base); +struct buf_output out; c1 =num2str (o->min_bs[DDIR_READ ], o->sig_figs,1 , i2p,N2S_BYTE ); c2 =num2str (o->max_bs[DDIR_READ ], o->sig_figs,1 , i2p,N2S_BYTE );
@@ -1692,19 +1693,22 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, c6 =num2str (o->max_bs[DDIR_TRIM ], o->sig_figs,1 , i2p,N2S_BYTE ); } -log_info ("%s: (g=%d): rw=%s, " , td->o.name, +buf_output_init (&out); +__log_buf (&out,"%s: (g=%d): rw=%s, " , td->o.name, td->groupid,ddir_str (o->td_ddir));if (o->bs_is_seq_rand) -log_info ("bs=(R) %s-%s, (W) %s-%s, bs_is_seq_rand, " , +__log_buf (&out,"bs=(R) %s-%s, (W) %s-%s, bs_is_seq_rand, " , c1, c2, c3, c4);else -log_info ("bs=(R) %s-%s, (W) %s-%s, (T) %s-%s, " , +__log_buf (&out,"bs=(R) %s-%s, (W) %s-%s, (T) %s-%s, " , c1, c2, c3, c4, c5, c6); -log_info ("ioengine=%s, iodepth=%u\n" , +__log_buf (&out,"ioengine=%s, iodepth=%u\n" , td->io_ops->name, o->iodepth); +log_info_buf (out.buf, out.buflen); +buf_output_free (&out);free (c1);free (c2);
stat.c +0 -2
@@ -1928,8 +1928,6 @@ void __show_run_stats(void)if (is_backend) {fio_server_send_job_options (opt_lists[i], i);fio_server_send_ts (ts, rs); -if (output_format &FIO_OUTPUT_TERSE ) -show_thread_status_terse (ts, rs, &output[__FIO_OUTPUT_TERSE]); }else {if (output_format &FIO_OUTPUT_TERSE )show_thread_status_terse (ts, rs, &output[__FIO_OUTPUT_TERSE]);