summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c80
1 files changed, 42 insertions, 38 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index b6d44f8..f7a410d 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -86,45 +86,49 @@ H5Z_term_interface (void)
int dir, nprint=0;
char comment[16], bandwidth[32];
- for (i=0; i<H5Z_table_used_g; i++) {
- for (dir=0; dir<2; dir++) {
- if (0==H5Z_table_g[i].stats[dir].total) continue;
-
- if (0==nprint++) {
- /* Print column headers */
- HDfprintf (stderr, "H5Z: filter statistics accumulated "
- "over life of library:\n");
- HDfprintf (stderr, " %-16s %10s %10s %8s %8s %8s %10s\n",
- "Filter", "Total", "Errors", "User",
- "System", "Elapsed", "Bandwidth");
- HDfprintf (stderr, " %-16s %10s %10s %8s %8s %8s %10s\n",
- "------", "-----", "------", "----",
- "------", "-------", "---------");
- }
+ if (H5DEBUG(Z)) {
+ for (i=0; i<H5Z_table_used_g; i++) {
+ for (dir=0; dir<2; dir++) {
+ if (0==H5Z_table_g[i].stats[dir].total) continue;
+
+ if (0==nprint++) {
+ /* Print column headers */
+ HDfprintf (H5DEBUG(Z), "H5Z: filter statistics "
+ "accumulated over life of library:\n");
+ HDfprintf (H5DEBUG(Z),
+ " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "Filter", "Total", "Errors", "User",
+ "System", "Elapsed", "Bandwidth");
+ HDfprintf (H5DEBUG(Z),
+ " %-16s %10s %10s %8s %8s %8s %10s\n",
+ "------", "-----", "------", "----",
+ "------", "-------", "---------");
+ }
- /* Truncate the comment to fit in the field */
- strncpy(comment, H5Z_table_g[i].name, sizeof comment);
- comment[sizeof(comment)-1] = '\0';
-
- /*
- * Format bandwidth to have four significant digits and units
- * of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or the word
- * `Inf' if the elapsed time is zero.
- */
- H5_bandwidth(bandwidth,
- (double)(H5Z_table_g[i].stats[dir].total),
- H5Z_table_g[i].stats[dir].timer.etime);
-
- /* Print the statistics */
- HDfprintf (stderr,
- " %s%-15s %10Hd %10Hd %8.2f %8.2f %8.2f "
- "%10s\n", dir?"<":">", comment,
- H5Z_table_g[i].stats[dir].total,
- H5Z_table_g[i].stats[dir].errors,
- H5Z_table_g[i].stats[dir].timer.utime,
- H5Z_table_g[i].stats[dir].timer.stime,
- H5Z_table_g[i].stats[dir].timer.etime,
- bandwidth);
+ /* Truncate the comment to fit in the field */
+ strncpy(comment, H5Z_table_g[i].name, sizeof comment);
+ comment[sizeof(comment)-1] = '\0';
+
+ /*
+ * Format bandwidth to have four significant digits and units
+ * of `B/s', `kB/s', `MB/s', `GB/s', or `TB/s' or the word
+ * `Inf' if the elapsed time is zero.
+ */
+ H5_bandwidth(bandwidth,
+ (double)(H5Z_table_g[i].stats[dir].total),
+ H5Z_table_g[i].stats[dir].timer.etime);
+
+ /* Print the statistics */
+ HDfprintf (H5DEBUG(Z),
+ " %s%-15s %10Hd %10Hd %8.2f %8.2f %8.2f "
+ "%10s\n", dir?"<":">", comment,
+ H5Z_table_g[i].stats[dir].total,
+ H5Z_table_g[i].stats[dir].errors,
+ H5Z_table_g[i].stats[dir].timer.utime,
+ H5Z_table_g[i].stats[dir].timer.stime,
+ H5Z_table_g[i].stats[dir].timer.etime,
+ bandwidth);
+ }
}
}
#endif