diff options
Diffstat (limited to 'src/H5FDvfd_swmr_private.h')
-rw-r--r-- | src/H5FDvfd_swmr_private.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/H5FDvfd_swmr_private.h b/src/H5FDvfd_swmr_private.h index bc5c177..333bcc7 100644 --- a/src/H5FDvfd_swmr_private.h +++ b/src/H5FDvfd_swmr_private.h @@ -88,14 +88,33 @@ H5_DLL herr_t H5F_dump_eot_queue(void); /* Log Macros and Functions */ /***************************************/ +/* VFD SWMR Helper macros to calcuate the elapsed time */ +/* The total time in seconds */ #define TOTAL_TIME_PASSED(X, Y) \ ((double)((Y.tv_sec - X.tv_sec) * 1000000000 + (Y.tv_nsec - X.tv_nsec))) / 1000000000.0 + +/* #define TIME_PASSED_MIN(X) (unsigned int)(X / 60000) #define TIME_PASSED_SEC(X, Y) (unsigned int)((X - Y * 60000) / 1000) #define TIME_PASSED_MSEC(X, Y, Z) (unsigned int)(X - Y * 60000 - Z * 1000) +*/ /* Add more tags */ -static const char *H5Fvfd_swmr_log_tags[] = {"FILE_OPEN", "FILE_CLOSE", "EOT_TRIGGER_TIME", - "EOT_PROCESSING_TIME", "EOT_META_FILE_INDEX"}; +/* The VFD SMWR Log tags. Note this array of string is used to generate the + * entry tag by the log reporting function H5F_POST_VFD_SWMR_LOG_ENTRY. + * If the entry code is 0, H5Fvfd_swmr_log_tags[0] is used to report the entry tag. + * H5F_POST_VFD_SWMR_LOG_ENTRY(f, 3, log_msg) will put the log_msg attached to + * the entry tag "EOT_PROCESSING_TIME". + */ +/* clang-format off */ +/* The entry code number is listed in the comment for convenience. */ +static const char *H5Fvfd_swmr_log_tags[] = { + "FILE_OPEN", /* 0 */ + "FILE_CLOSE", /* 1 */ + "EOT_TRIGGER_TIME", /* 2 */ + "EOT_PROCESSING_TIME", /* 3 */ + "EOT_META_FILE_INDEX" /* 4 */ + }; +/* clang-format on */ #endif /* H5FDvfd_swmr_private_H */ |