summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2021-08-03 20:28:31 (GMT)
committergithub-actions <41898282+github-actions[bot]@users.noreply.github.com>2021-08-03 20:28:31 (GMT)
commit84b8db9485acfc764bb9380721d1464a30771888 (patch)
tree8c677a1f44a5f4c9086a440b1584855b2a096298
parent85c647de12fb0f8f6d5d37738f496ba8097a5867 (diff)
downloadhdf5-84b8db9485acfc764bb9380721d1464a30771888.zip
hdf5-84b8db9485acfc764bb9380721d1464a30771888.tar.gz
hdf5-84b8db9485acfc764bb9380721d1464a30771888.tar.bz2
Committing clang-format changes
-rw-r--r--test/vfd_swmr_gperf_writer.c59
1 files changed, 24 insertions, 35 deletions
diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c
index ac56ee4..389749f 100644
--- a/test/vfd_swmr_gperf_writer.c
+++ b/test/vfd_swmr_gperf_writer.c
@@ -10,17 +10,17 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Description of this program:
+/* Description of this program:
* This program checks the performance of group creations for VFD SWMR.
* Currently the group creation time, H5Fopen and H5Fclose time are measured.
- * After compiling the program,
+ * After compiling the program,
* ./vfd_swmr_gperf_writer -n 1000 -P -N 5 -a 1 -q
- * will generate 1000 groups, each group has 5 attributes.
+ * will generate 1000 groups, each group has 5 attributes.
* ./vfd_swmr_gperf_writer -n 1000 -P -N 0 -q
* will generate 1000 empty groups.
* ./vfd_swmr_gperf_writer -n 1000 -P -q
* will generate 1000 groups,for every ten groups, an attribute is generated.
-*/
+ */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "hdf5.h"
@@ -34,7 +34,7 @@
#ifndef H5_HAVE_WIN32_API
-#define VS_ATTR_NAME_LEN 21
+#define VS_ATTR_NAME_LEN 21
#define TIME_PASSED(X, Y) \
((double)((Y.tv_sec - X.tv_sec) * 1000000000 + (Y.tv_nsec - X.tv_nsec))) / 1000000000.0
@@ -67,13 +67,10 @@ typedef struct {
(state_t) \
{ \
.file = H5I_INVALID_HID, .one_by_one_sid = H5I_INVALID_HID, .filename = "", \
- .filetype = H5T_NATIVE_UINT32, .asteps = 10, .nsteps = 100, \
- .use_vfd_swmr = true, .old_style_grp = false, \
- .grp_op_pattern = ' ', .grp_op_test = false, .at_pattern = ' ', \
- .attr_test = false, .tick_len = 4, .max_lag = 7, \
- .gperf = false, .min_time = 100., .max_time = 0.,.mean_time = 0., \
- .total_time = 0., .fo_total_time = 0., \
- .fc_total_time = 0., .num_attrs = 1 \
+ .filetype = H5T_NATIVE_UINT32, .asteps = 10, .nsteps = 100, .use_vfd_swmr = true, \
+ .old_style_grp = false, .grp_op_pattern = ' ', .grp_op_test = false, .at_pattern = ' ', \
+ .attr_test = false, .tick_len = 4, .max_lag = 7, .gperf = false, .min_time = 100., .max_time = 0., \
+ .mean_time = 0., .total_time = 0., .fo_total_time = 0., .fc_total_time = 0., .num_attrs = 1 \
}
static void
@@ -445,7 +442,6 @@ add_attr(state_t *s, hid_t oid, unsigned int which, unsigned num_attrs, const ch
}
}
-
} /* end for */
if (H5Tclose(amtype) < 0) {
@@ -1560,7 +1556,6 @@ write_group(state_t *s, unsigned int which)
}
}
-
/* Then carry out the attribute operation. */
if (s->asteps != 0 && which % s->asteps == 0)
result = add_group_attribute(s, g, gcpl, which);
@@ -3585,7 +3580,6 @@ vrfy_create_group(state_t *s, unsigned int which)
TEST_ERROR;
}
-
return true;
error:
@@ -3746,7 +3740,6 @@ vrfy_close_group_id(state_t *s, hid_t g)
TEST_ERROR;
}
-
return true;
error:
@@ -3790,7 +3783,6 @@ vrfy_one_link_exist(state_t *s, hid_t obj_id, const char *name, bool expect_exis
int link_exists = 0;
H5G_info_t group_info;
-
link_exists = H5Lexists(obj_id, name, H5P_DEFAULT);
if (link_exists < 0) {
@@ -4298,7 +4290,6 @@ verify_group_operations(state_t *s, unsigned int which)
return ret_value;
}
-
int
main(int argc, char **argv)
{
@@ -4384,17 +4375,16 @@ main(int argc, char **argv)
TEST_ERROR;
}
-
if (writer) {
- if (s.gperf) {
+ if (s.gperf) {
- if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
+ if (HDclock_gettime(CLOCK_MONOTONIC, &start_time) == -1) {
- fprintf(stderr, "HDclock_gettime failed");
+ fprintf(stderr, "HDclock_gettime failed");
- TEST_ERROR;
+ TEST_ERROR;
+ }
}
- }
for (step = 0; step < s.nsteps; step++) {
dbgf(2, "writer: step %d\n", step);
@@ -4406,21 +4396,20 @@ main(int argc, char **argv)
TEST_ERROR;
}
}
- if (s.gperf) {
+ if (s.gperf) {
- if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
+ if (HDclock_gettime(CLOCK_MONOTONIC, &end_time) == -1) {
- fprintf(stderr, "HDclock_gettime failed");
+ fprintf(stderr, "HDclock_gettime failed");
- TEST_ERROR;
- }
-
- s.total_time = TIME_PASSED(start_time, end_time);
- s.mean_time = s.total_time / s.nsteps;
- fprintf(stdout, "group creation +5 attrs total time = %lf\n", s.total_time);
- fprintf(stdout, "group creation +5 attrs mean time = %lf\n", s.mean_time);
- }
+ TEST_ERROR;
+ }
+ s.total_time = TIME_PASSED(start_time, end_time);
+ s.mean_time = s.total_time / s.nsteps;
+ fprintf(stdout, "group creation +5 attrs total time = %lf\n", s.total_time);
+ fprintf(stdout, "group creation +5 attrs mean time = %lf\n", s.mean_time);
+ }
}
else {
for (step = 0; step < s.nsteps; step++) {