summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 5c1cfd6..60b2ebe 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -139,8 +139,17 @@ H5Z_term_package(void)
if(H5DEBUG(Z)) {
for(i = 0; i < H5Z_table_used_g; i++) {
for(dir = 0; dir<2; dir++) {
+ struct {
+ char *user;
+ char *system;
+ char *elapsed;
+ } timestrs = {
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.user),
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.system),
+ H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.elapsed)
+ };
if(0 == H5Z_stat_table_g[i].stats[dir].total)
- continue;
+ goto next;
if(0 == nprint++) {
/* Print column headers */
@@ -161,23 +170,29 @@ H5Z_term_package(void)
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.
- */
+ * 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_stat_table_g[i].stats[dir].total),
H5Z_stat_table_g[i].stats[dir].times.elapsed);
/* Print the statistics */
- HDfprintf(H5DEBUG(Z), " %s%-15s %10Hd %10Hd %8T %8T %8T %10s\n",
- (dir ? "<" : ">"), comment,
- H5Z_stat_table_g[i].stats[dir].total,
- H5Z_stat_table_g[i].stats[dir].errors,
- H5Z_stat_table_g[i].stats[dir].times.user,
- H5Z_stat_table_g[i].stats[dir].times.system,
- H5Z_stat_table_g[i].stats[dir].times.elapsed,
- bandwidth);
+ HDfprintf(H5DEBUG(Z),
+ " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE
+ " %8s %8s %8s %10s\n",
+ (dir ? "<" : ">"), comment,
+ H5Z_stat_table_g[i].stats[dir].total,
+ H5Z_stat_table_g[i].stats[dir].errors,
+ timestrs.user,
+ timestrs.system,
+ timestrs.elapsed,
+ bandwidth);
+ next:
+ free(timestrs.user);
+ free(timestrs.system);
+ free(timestrs.elapsed);
} /* end for */
} /* end for */
} /* end if */