Permalink
Browse files

Allow user to hide a test's output with verbose<0.

  • Loading branch information...
1 parent 0665dea commit bbcc9c26b68967174a98cf1a6daf884752c626b8 @morrone morrone committed Jan 13, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/ior.c
View
@@ -138,6 +138,9 @@ int main(int argc, char **argv)
TestIoSys(tptr);
}
+ if (verbose < 0)
+ /* always print final summary */
+ verbose = 0;
PrintLongSummaryAllTests(tests_head);
/* display finish time */
@@ -1217,7 +1220,7 @@ static void ReduceIterResults(IOR_test_t *test, double **timer, int rep,
static void PrintRemoveTiming(double start, double finish, int rep)
{
- if (rank != 0)
+ if (rank != 0 || verbose < VERBOSE_0)
return;
printf("remove - - - - - - ");
@@ -1639,7 +1642,7 @@ static void PrintLongSummaryOneOperation(IOR_test_t *test, double *times, char *
struct results *bw;
int reps;
- if (rank != 0)
+ if (rank != 0 || verbose < VERBOSE_0)
return;
reps = params->repetitions;
@@ -1686,6 +1689,9 @@ static void PrintLongSummaryOneTest(IOR_test_t *test)
static void PrintLongSummaryHeader()
{
+ if (rank != 0 || verbose < VERBOSE_0)
+ return;
+
fprintf(stdout, "\n");
fprintf(stdout, "%-9s %10s %10s %10s %10s %10s",
"Operation", "Max(MiB)", "Min(MiB)", "Mean(MiB)", "StdDev",
@@ -1698,7 +1704,7 @@ static void PrintLongSummaryAllTests(IOR_test_t *tests_head)
{
IOR_test_t *tptr;
- if (rank !=0)
+ if (rank != 0 || verbose < VERBOSE_0)
return;
fprintf(stdout, "\n");
@@ -1951,7 +1957,7 @@ static void TestIoSys(IOR_test_t *test)
params->timeStampSignatureValue,
params->timeStampSignatureValue);
}
- if (rep == 0) {
+ if (rep == 0 && verbose >= VERBOSE_0) {
fprintf(stdout, "\n");
fprintf(stdout, "access bw(MiB/s) block(KiB) xfer(KiB) open(s) wr/rd(s) close(s) total(s) iter\n");
fprintf(stdout, "------ --------- ---------- --------- -------- -------- -------- -------- ----\n");

0 comments on commit bbcc9c2

Please sign in to comment.