diff options
| author | Kaushal M <kaushal@gluster.com> | 2011-07-19 14:36:13 +0530 | 
|---|---|---|
| committer | Anand Avati <avati@gluster.com> | 2011-07-19 07:06:17 -0700 | 
| commit | e74bf1ae7d974ae3681818a0a6240adee5983323 (patch) | |
| tree | 03ffc8955a65477a563c811018134c4fd0e648dd /cli | |
| parent | 9e7f02aa79e889e4b91604ef84b5f948dc3787f9 (diff) | |
cli: modifications to "profile info" output
Units are now shown for the latencies and duration
Changed some text to be more meaningful
Change-Id: I1891d6ac541421606dda30ed10f9b40b21e2fa52
BUG: 3028
Reviewed-on: http://review.gluster.com/18
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vikas Gorur <vikas.gluster@gmail.com>
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/cli-rpc-ops.c | 32 | 
1 files changed, 16 insertions, 16 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index c08f03b3612..26e78dca174 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3056,10 +3056,10 @@ cmd_profile_volume_brick_out (dict_t *dict, int count, int interval)                  cli_out ("Cumulative Stats:");          else                  cli_out ("Interval %d Stats:", interval); -        snprintf (output, sizeof (output), "%12s", "Block Size: "); -        snprintf (read_blocks, sizeof (read_blocks), "%12s", "Read: "); -        snprintf (write_blocks, sizeof (write_blocks), "%12s", "Write: "); -        index = 12; +        snprintf (output, sizeof (output), "%14s", "Block Size:"); +        snprintf (read_blocks, sizeof (read_blocks), "%14s", "No. of Reads:"); +        snprintf (write_blocks, sizeof (write_blocks), "%14s", "No. of Writes:"); +        index = 14;          for (i = 0; i < 32; i++) {                  if ((rb_counts[i] == 0) && (wb_counts[i] == 0))                          continue; @@ -3089,12 +3089,12 @@ cmd_profile_volume_brick_out (dict_t *dict, int count, int interval)                          memset (output, 0, sizeof (output));                          memset (read_blocks, 0, sizeof (read_blocks));                          memset (write_blocks, 0, sizeof (write_blocks)); -                        snprintf (output, sizeof (output), "%12s", "Block Size: "); -                        snprintf (read_blocks, sizeof (read_blocks), "%12s", -                                  "Read: "); -                        snprintf (write_blocks, sizeof (write_blocks), "%12s", -                                  "Write: "); -                        index = 12; +                        snprintf (output, sizeof (output), "%13s", "Block Size:"); +                        snprintf (read_blocks, sizeof (read_blocks), "%13s", +                                  "No of Reads:"); +                        snprintf (write_blocks, sizeof (write_blocks), "%13s", +                                  "No of Writes:"); +                        index = 13;                  }          } @@ -3107,12 +3107,12 @@ cmd_profile_volume_brick_out (dict_t *dict, int count, int interval)                  if (profile_info[i].fop_hits == 0)                          continue;                  if (is_header_printed == 0) { -                        cli_out ("%11s %11s %11s %11s %20s %10s", "%-latency", "Avg-latency", "Min-Latency", "Max-Latency", "calls", "Fop"); -                        cli_out ("%11s %11s %11s %11s %20s %10s", "---------", "-----------", "-----------", "-----------", "-----", "----"); +                        cli_out ("%11s %14s %14s %14s %20s %10s", "%-latency", "Avg-latency", "Min-Latency", "Max-Latency", "No of calls", "Fop"); +                        cli_out ("%11s %14s %14s %14s %20s %10s", "---------", "-----------", "-----------", "-----------", "-----------", "----");                          is_header_printed = 1;                  }                  if (profile_info[i].fop_hits) { -                        cli_out ("%11.2lf %11.2lf %11.2lf %11.2lf %20"PRId64" %10s", +                        cli_out ("%11.2lf %11.2lf us %11.2lf us %11.2lf us %20"PRId64" %10s",                                   profile_info[i].percentage_avg_latency,                                   profile_info[i].avg_latency,                                   profile_info[i].min_latency, @@ -3122,9 +3122,9 @@ cmd_profile_volume_brick_out (dict_t *dict, int count, int interval)                  }          }          cli_out (" "); -        cli_out ("%12s : %"PRId64, "Duration", sec); -        cli_out ("%12s : %"PRId64, "BytesRead", r_count); -        cli_out ("%12s : %"PRId64, "BytesWritten", w_count); +        cli_out ("%12s: %"PRId64" seconds", "Duration", sec); +        cli_out ("%12s: %"PRId64" bytes", "Data Read", r_count); +        cli_out ("%12s: %"PRId64" bytes", "Data Written", w_count);          cli_out (" ");  }  | 
