summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal M <kaushal@gluster.com>2011-10-14 14:02:51 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-17 01:50:54 -0700
commit57abdb20ade542e9f57461ec953dad8ca93b23c7 (patch)
tree5942413228ceb4c40196d266860d64de576197c5
parent7f8d2e19bb09cb49a19f835bd69b03612a1f007e (diff)
cli: "profile info" output improvements
Some changes to profile info output. Change-Id: I2e7a5c088fbb29be7df28de79d9817c5a492d775 BUG: 3028 Reviewed-on: http://review.gluster.com/586 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--cli/src/cli-rpc-ops.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 29589591ea6..37fbc26c879 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -2942,10 +2942,12 @@ 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;
@@ -2993,12 +2995,17 @@ 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 ("%10s %13s %13s %13s %14s %11s", "%-latency",
+ "Avg-latency", "Min-Latency", "Max-Latency",
+ "No. of calls", "Fop");
+ cli_out ("%10s %13s %13s %13s %14s %11s", "---------",
+ "-----------", "-----------", "-----------",
+ "------------", "----");
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 ("%10.2lf %10.2lf us %10.2lf us %10.2lf us"
+ " %14"PRId64" %11s",
profile_info[i].percentage_avg_latency,
profile_info[i].avg_latency,
profile_info[i].min_latency,