summaryrefslogtreecommitdiffstats
path: root/tools/h5stat/testfiles
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-08-16 19:20:34 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-08-16 19:20:34 (GMT)
commitdd327986b9d8137a1106c6f750712d68e5e27813 (patch)
tree3faafa475d5bba5a1cfd86021e71b37d9845c9bb /tools/h5stat/testfiles
parentefb39881a0e4cc59799238a2c6758f41be780abc (diff)
downloadhdf5-dd327986b9d8137a1106c6f750712d68e5e27813.zip
hdf5-dd327986b9d8137a1106c6f750712d68e5e27813.tar.gz
hdf5-dd327986b9d8137a1106c6f750712d68e5e27813.tar.bz2
[svn-r24014] This checkin is a merge of the checkin for h5stat to the trunk (rev #23975-23977) + an additional bug fix--
A) Fix for HDFFV-1238: --Add 3 new options to allow users in setting threshold for small groups/datasets/attributes (tools/h5stat/h5stat.c) --Generate new test file for testing the new options (tools/h5stat/h5stat_gentest.c) --Add tests for the new options (tools/h5stat/testh5stat.sh.in) --Update expected output files (tools/h5stat/testfiles/*.ddl) B) Fix a bug in determining maximum dimension size for 1-D dataset in dataset_stats() (tools/h5stat/h5stat.c) C) Fix a bug when using opt_arg that is NULL for the new options.
Diffstat (limited to 'tools/h5stat/testfiles')
-rw-r--r--tools/h5stat/testfiles/h5stat_dims1.ddl47
-rw-r--r--tools/h5stat/testfiles/h5stat_dims2.ddl38
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_dims.ddl4
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_links.ddl4
-rw-r--r--tools/h5stat/testfiles/h5stat_err1_numattrs.ddl4
-rw-r--r--tools/h5stat/testfiles/h5stat_err2_numattrs.ddl4
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-d.ddl6
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-dT.ddl6
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-g.ddl4
-rw-r--r--tools/h5stat/testfiles/h5stat_filters.ddl12
-rw-r--r--tools/h5stat/testfiles/h5stat_help1.ddl9
-rw-r--r--tools/h5stat/testfiles/h5stat_help2.ddl9
-rw-r--r--tools/h5stat/testfiles/h5stat_links1.ddl13
-rw-r--r--tools/h5stat/testfiles/h5stat_links2.ddl96
-rw-r--r--tools/h5stat/testfiles/h5stat_links3.ddl15
-rw-r--r--tools/h5stat/testfiles/h5stat_links4.ddl11
-rw-r--r--tools/h5stat/testfiles/h5stat_links5.ddl12
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat-UA.ddl2
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat-UG.ddl2
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat.ddl24
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat.h5bin6363081 -> 6367891 bytes
-rw-r--r--tools/h5stat/testfiles/h5stat_nofile.ddl27
-rw-r--r--tools/h5stat/testfiles/h5stat_numattrs1.ddl18
-rw-r--r--tools/h5stat/testfiles/h5stat_numattrs2.ddl96
-rw-r--r--tools/h5stat/testfiles/h5stat_numattrs3.ddl15
-rw-r--r--tools/h5stat/testfiles/h5stat_numattrs4.ddl11
-rw-r--r--tools/h5stat/testfiles/h5stat_threshold.h5bin0 -> 16312 bytes
-rw-r--r--tools/h5stat/testfiles/h5stat_tsohm.ddl12
28 files changed, 467 insertions, 34 deletions
diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl
new file mode 100644
index 0000000..182d31a
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_dims1.ddl
@@ -0,0 +1,47 @@
+#############################
+Expected output for 'h5stat -gd -m 5 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Small groups (with 0 to 9 links):
+ # of groups with 0 link(s): 1
+ # of groups with 7 link(s): 1
+ # of groups with 9 link(s): 1
+ Total # of small groups: 3
+Group bins:
+ # of groups with 0 link: 1
+ # of groups with 1 - 9 links: 2
+ # of groups with 10 - 99 links: 1
+ Total # of groups: 4
+Dataset dimension information:
+ Max. rank of datasets: 2
+ Dataset ranks:
+ # of dataset with rank 0: 2
+ # of dataset with rank 1: 20
+ # of dataset with rank 2: 1
+1-D Dataset information:
+ Max. dimension size of 1-D datasets: 6
+ Small 1-D datasets (with dimension sizes 0 to 4):
+ # of datasets with dimension sizes 0: 1
+ Total # of small datasets: 1
+ 1-D Dataset dimension bins:
+ # of datasets with dimension size 0: 1
+ # of datasets with dimension size 1 - 9: 19
+ Total # of datasets: 20
+Dataset storage information:
+ Total raw data size: 0
+ Total external raw data size: 0
+Dataset layout information:
+ Dataset layout counts[COMPACT]: 0
+ Dataset layout counts[CONTIG]: 23
+ Dataset layout counts[CHUNKED]: 0
+ Number of external files : 0
+Dataset filters information:
+ Number of datasets with:
+ NO filter: 23
+ GZIP filter: 0
+ SHUFFLE filter: 0
+ FLETCHER32 filter: 0
+ SZIP filter: 0
+ NBIT filter: 0
+ SCALEOFFSET filter: 0
+ USER-DEFINED filter: 0
diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl
new file mode 100644
index 0000000..abf3f61
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_dims2.ddl
@@ -0,0 +1,38 @@
+#############################
+Expected output for 'h5stat -d --di=15 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Dataset dimension information:
+ Max. rank of datasets: 2
+ Dataset ranks:
+ # of dataset with rank 0: 2
+ # of dataset with rank 1: 20
+ # of dataset with rank 2: 1
+1-D Dataset information:
+ Max. dimension size of 1-D datasets: 6
+ Small 1-D datasets (with dimension sizes 0 to 14):
+ # of datasets with dimension sizes 0: 1
+ # of datasets with dimension sizes 6: 19
+ Total # of small datasets: 20
+ 1-D Dataset dimension bins:
+ # of datasets with dimension size 0: 1
+ # of datasets with dimension size 1 - 9: 19
+ Total # of datasets: 20
+Dataset storage information:
+ Total raw data size: 0
+ Total external raw data size: 0
+Dataset layout information:
+ Dataset layout counts[COMPACT]: 0
+ Dataset layout counts[CONTIG]: 23
+ Dataset layout counts[CHUNKED]: 0
+ Number of external files : 0
+Dataset filters information:
+ Number of datasets with:
+ NO filter: 23
+ GZIP filter: 0
+ SHUFFLE filter: 0
+ FLETCHER32 filter: 0
+ SZIP filter: 0
+ NBIT filter: 0
+ SCALEOFFSET filter: 0
+ USER-DEFINED filter: 0
diff --git a/tools/h5stat/testfiles/h5stat_err1_dims.ddl b/tools/h5stat/testfiles/h5stat_err1_dims.ddl
new file mode 100644
index 0000000..8f0686f
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_err1_dims.ddl
@@ -0,0 +1,4 @@
+#############################
+Expected output for 'h5stat -d --dims=-1 h5stat_threshold.h5'
+#############################
+h5stat error: Invalid threshold for small datasets
diff --git a/tools/h5stat/testfiles/h5stat_err1_links.ddl b/tools/h5stat/testfiles/h5stat_err1_links.ddl
new file mode 100644
index 0000000..07987a2
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_err1_links.ddl
@@ -0,0 +1,4 @@
+#############################
+Expected output for 'h5stat -l 0 h5stat_threshold.h5'
+#############################
+h5stat error: Invalid threshold for small groups
diff --git a/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl
new file mode 100644
index 0000000..8eea546
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_err1_numattrs.ddl
@@ -0,0 +1,4 @@
+#############################
+Expected output for 'h5stat -a -2 h5stat_threshold.h5'
+#############################
+h5stat error: Invalid threshold for small # of attributes
diff --git a/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl
new file mode 100644
index 0000000..a1ecb31
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_err2_numattrs.ddl
@@ -0,0 +1,4 @@
+#############################
+Expected output for 'h5stat --numattrs h5stat_threshold.h5'
+#############################
+h5stat error: Invalid threshold for small # of attributes
diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl
index 3cc9071..dae1f06 100644
--- a/tools/h5stat/testfiles/h5stat_filters-d.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl
@@ -9,10 +9,10 @@ Dataset dimension information:
# of dataset with rank 2: 14
1-D Dataset information:
Max. dimension size of 1-D datasets: 100
- Small 1-D datasets:
- Total small datasets: 0
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ Total # of small datasets: 0
1-D Dataset dimension bins:
- # of datasets of size 100 - 999: 1
+ # of datasets with dimension size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
Total raw data size: 8659
diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
index ae9121d..5c7a4ab 100644
--- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
@@ -9,10 +9,10 @@ Dataset dimension information:
# of dataset with rank 2: 14
1-D Dataset information:
Max. dimension size of 1-D datasets: 100
- Small 1-D datasets:
- Total small datasets: 0
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ Total # of small datasets: 0
1-D Dataset dimension bins:
- # of datasets of size 100 - 999: 1
+ # of datasets with dimension size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
Total raw data size: 8659
diff --git a/tools/h5stat/testfiles/h5stat_filters-g.ddl b/tools/h5stat/testfiles/h5stat_filters-g.ddl
index d488b8f..6cb791c 100644
--- a/tools/h5stat/testfiles/h5stat_filters-g.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-g.ddl
@@ -2,8 +2,8 @@
Expected output for 'h5stat -g h5stat_filters.h5'
#############################
Filename: h5stat_filters.h5
-Small groups:
+Small groups (with 0 to 9 links):
Total # of small groups: 0
Group bins:
- # of groups of size 10 - 99: 1
+ # of groups with 10 - 99 links: 1
Total # of groups: 1
diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl
index 15bb66b..5fdbd31 100644
--- a/tools/h5stat/testfiles/h5stat_filters.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters.ddl
@@ -31,10 +31,10 @@ File space information for file metadata (in bytes):
Header: 0
B-tree/List: 0
Heap: 0
-Small groups:
+Small groups (with 0 to 9 links):
Total # of small groups: 0
Group bins:
- # of groups of size 10 - 99: 1
+ # of groups with 10 - 99 links: 1
Total # of groups: 1
Dataset dimension information:
Max. rank of datasets: 2
@@ -43,10 +43,10 @@ Dataset dimension information:
# of dataset with rank 2: 14
1-D Dataset information:
Max. dimension size of 1-D datasets: 100
- Small 1-D datasets:
- Total small datasets: 0
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ Total # of small datasets: 0
1-D Dataset dimension bins:
- # of datasets of size 100 - 999: 1
+ # of datasets with dimension size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
Total raw data size: 8659
@@ -75,7 +75,7 @@ Dataset datatype information:
Count (total/named) = (1/0)
Size (desc./elmt) = (14/4)
Total dataset datatype count: 15
-Small # of attributes:
+Small # of attributes (objects with 1 to 10 attributes):
Total # of objects with small # of attributes: 0
Attribute bins:
Total # of objects with attributes: 0
diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl
index bf7e1fa..378389e 100644
--- a/tools/h5stat/testfiles/h5stat_help1.ddl
+++ b/tools/h5stat/testfiles/h5stat_help1.ddl
@@ -9,9 +9,18 @@ Usage: h5stat [OPTIONS] file
-f, --file Print file information
-F, --filemetadata Print file space information for file's metadata
-g, --group Print group information
+ -l N, --links=N Set the threshold for the # of links when printing
+ information for small groups. N is an integer greater
+ than 0. The default threshold is 10.
-G, --groupmetadata Print file space information for groups' metadata
-d, --dset Print dataset information
+ -m N, --dims=N Set the threshold for the dimension sizes when printing
+ information for small datasets. N is an integer greater
+ than 0. The default threshold is 10.
-D, --dsetmetadata Print file space information for datasets' metadata
-T, --dtypemetadata Print datasets' datatype information
-A, --attribute Print attribute information
+ -a N, --numattrs=N Set the threshold for the # of attributes when printing
+ information for small # of attributes. N is an integer greater
+ than 0. The default threshold is 10.
-S, --summary Print summary of file space information
diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl
index 15f987a..65d8bca 100644
--- a/tools/h5stat/testfiles/h5stat_help2.ddl
+++ b/tools/h5stat/testfiles/h5stat_help2.ddl
@@ -9,9 +9,18 @@ Usage: h5stat [OPTIONS] file
-f, --file Print file information
-F, --filemetadata Print file space information for file's metadata
-g, --group Print group information
+ -l N, --links=N Set the threshold for the # of links when printing
+ information for small groups. N is an integer greater
+ than 0. The default threshold is 10.
-G, --groupmetadata Print file space information for groups' metadata
-d, --dset Print dataset information
+ -m N, --dims=N Set the threshold for the dimension sizes when printing
+ information for small datasets. N is an integer greater
+ than 0. The default threshold is 10.
-D, --dsetmetadata Print file space information for datasets' metadata
-T, --dtypemetadata Print datasets' datatype information
-A, --attribute Print attribute information
+ -a N, --numattrs=N Set the threshold for the # of attributes when printing
+ information for small # of attributes. N is an integer greater
+ than 0. The default threshold is 10.
-S, --summary Print summary of file space information
diff --git a/tools/h5stat/testfiles/h5stat_links1.ddl b/tools/h5stat/testfiles/h5stat_links1.ddl
new file mode 100644
index 0000000..e77a788
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_links1.ddl
@@ -0,0 +1,13 @@
+#############################
+Expected output for 'h5stat -g -l 8 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Small groups (with 0 to 7 links):
+ # of groups with 0 link(s): 1
+ # of groups with 7 link(s): 1
+ Total # of small groups: 2
+Group bins:
+ # of groups with 0 link: 1
+ # of groups with 1 - 9 links: 2
+ # of groups with 10 - 99 links: 1
+ Total # of groups: 4
diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl
new file mode 100644
index 0000000..27d6c6d
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_links2.ddl
@@ -0,0 +1,96 @@
+#############################
+Expected output for 'h5stat --links=8 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+File information
+ # of unique groups: 4
+ # of unique datasets: 23
+ # of unique named datatypes: 0
+ # of unique links: 0
+ # of unique other: 0
+ Max. # of links to object: 1
+ Max. # of objects in group: 10
+File space information for file metadata (in bytes):
+ Superblock extension: 0
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 3576/0
+ Datasets(exclude compact data): 7896/2912
+ Datatypes: 0/0
+ Groups:
+ B-tree/List: 3816
+ Heap: 744
+ Attributes:
+ B-tree/List: 0
+ Heap: 0
+ Chunked datasets:
+ Index: 0
+ Datasets:
+ Heap: 0
+ Shared Messages:
+ Header: 0
+ B-tree/List: 0
+ Heap: 0
+Small groups (with 0 to 7 links):
+ # of groups with 0 link(s): 1
+ # of groups with 7 link(s): 1
+ Total # of small groups: 2
+Group bins:
+ # of groups with 0 link: 1
+ # of groups with 1 - 9 links: 2
+ # of groups with 10 - 99 links: 1
+ Total # of groups: 4
+Dataset dimension information:
+ Max. rank of datasets: 2
+ Dataset ranks:
+ # of dataset with rank 0: 2
+ # of dataset with rank 1: 20
+ # of dataset with rank 2: 1
+1-D Dataset information:
+ Max. dimension size of 1-D datasets: 6
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ # of datasets with dimension sizes 0: 1
+ # of datasets with dimension sizes 6: 19
+ Total # of small datasets: 20
+ 1-D Dataset dimension bins:
+ # of datasets with dimension size 0: 1
+ # of datasets with dimension size 1 - 9: 19
+ Total # of datasets: 20
+Dataset storage information:
+ Total raw data size: 0
+ Total external raw data size: 0
+Dataset layout information:
+ Dataset layout counts[COMPACT]: 0
+ Dataset layout counts[CONTIG]: 23
+ Dataset layout counts[CHUNKED]: 0
+ Number of external files : 0
+Dataset filters information:
+ Number of datasets with:
+ NO filter: 23
+ GZIP filter: 0
+ SHUFFLE filter: 0
+ FLETCHER32 filter: 0
+ SZIP filter: 0
+ NBIT filter: 0
+ SCALEOFFSET filter: 0
+ USER-DEFINED filter: 0
+Dataset datatype information:
+ # of unique datatypes used by datasets: 1
+ Dataset datatype #0:
+ Count (total/named) = (23/0)
+ Size (desc./elmt) = (14/1)
+ Total dataset datatype count: 23
+Small # of attributes (objects with 1 to 10 attributes):
+ # of objects with 1 attributes: 2
+ # of objects with 10 attributes: 1
+ Total # of objects with small # of attributes: 3
+Attribute bins:
+ # of objects with 1 - 9 attributes: 2
+ # of objects with 10 - 99 attributes: 3
+ Total # of objects with attributes: 5
+ Max. # of attributes to objects: 25
+Summary of file space information:
+ File metadata: 16032 bytes
+ Raw data: 0 bytes
+ Unaccounted space: 280 bytes
+Total space: 16312 bytes
diff --git a/tools/h5stat/testfiles/h5stat_links3.ddl b/tools/h5stat/testfiles/h5stat_links3.ddl
new file mode 100644
index 0000000..d0071d7
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_links3.ddl
@@ -0,0 +1,15 @@
+#############################
+Expected output for 'h5stat --links=20 -g h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Small groups (with 0 to 19 links):
+ # of groups with 0 link(s): 1
+ # of groups with 7 link(s): 1
+ # of groups with 9 link(s): 1
+ # of groups with 10 link(s): 1
+ Total # of small groups: 4
+Group bins:
+ # of groups with 0 link: 1
+ # of groups with 1 - 9 links: 2
+ # of groups with 10 - 99 links: 1
+ Total # of groups: 4
diff --git a/tools/h5stat/testfiles/h5stat_links4.ddl b/tools/h5stat/testfiles/h5stat_links4.ddl
new file mode 100644
index 0000000..ca3911c
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_links4.ddl
@@ -0,0 +1,11 @@
+#############################
+Expected output for 'h5stat -g h5stat_newgrat.h5'
+#############################
+Filename: h5stat_newgrat.h5
+Small groups (with 0 to 9 links):
+ # of groups with 0 link(s): 35000
+ Total # of small groups: 35000
+Group bins:
+ # of groups with 0 link: 35000
+ # of groups with 10000 - 99999 links: 1
+ Total # of groups: 35001
diff --git a/tools/h5stat/testfiles/h5stat_links5.ddl b/tools/h5stat/testfiles/h5stat_links5.ddl
new file mode 100644
index 0000000..44ec161
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_links5.ddl
@@ -0,0 +1,12 @@
+#############################
+Expected output for 'h5stat -g -l 40000 h5stat_newgrat.h5'
+#############################
+Filename: h5stat_newgrat.h5
+Small groups (with 0 to 39999 links):
+ # of groups with 0 link(s): 35000
+ # of groups with 35001 link(s): 1
+ Total # of small groups: 35001
+Group bins:
+ # of groups with 0 link: 35000
+ # of groups with 10000 - 99999 links: 1
+ Total # of groups: 35001
diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl
index 70f9a82..18f91f3 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl
+++ b/tools/h5stat/testfiles/h5stat_newgrat-UA.ddl
@@ -2,7 +2,7 @@
Expected output for 'h5stat -A h5stat_newgrat.h5'
#############################
Filename: h5stat_newgrat.h5
-Small # of attributes:
+Small # of attributes (objects with 1 to 10 attributes):
Total # of objects with small # of attributes: 0
Attribute bins:
# of objects with 100 - 999 attributes: 1
diff --git a/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl
index b300a8f..ecebdef 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl
+++ b/tools/h5stat/testfiles/h5stat_newgrat-UG.ddl
@@ -5,4 +5,4 @@ Filename: h5stat_newgrat.h5
File space information for groups' metadata (in bytes):
Object headers (total/unused): 5145147/3220092
B-tree/List: 470054
- Heap: 739102
+ Heap: 739045
diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl
index ef50d4f..bd10e4a 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat.ddl
+++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl
@@ -19,10 +19,10 @@ File space information for file metadata (in bytes):
Datatypes: 0/0
Groups:
B-tree/List: 470054
- Heap: 739102
+ Heap: 739045
Attributes:
B-tree/List: 2598
- Heap: 4442
+ Heap: 4431
Chunked datasets:
Index: 0
Datasets:
@@ -31,12 +31,12 @@ File space information for file metadata (in bytes):
Header: 0
B-tree/List: 0
Heap: 0
-Small groups:
- # of groups of size 0: 35000
+Small groups (with 0 to 9 links):
+ # of groups with 0 link(s): 35000
Total # of small groups: 35000
Group bins:
- # of groups of size 0: 35000
- # of groups of size 10000 - 99999: 1
+ # of groups with 0 link: 35000
+ # of groups with 10000 - 99999 links: 1
Total # of groups: 35001
Dataset dimension information:
Max. rank of datasets: 0
@@ -44,8 +44,8 @@ Dataset dimension information:
# of dataset with rank 0: 1
1-D Dataset information:
Max. dimension size of 1-D datasets: 0
- Small 1-D datasets:
- Total small datasets: 0
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ Total # of small datasets: 0
Dataset storage information:
Total raw data size: 0
Total external raw data size: 0
@@ -70,14 +70,14 @@ Dataset datatype information:
Count (total/named) = (1/0)
Size (desc./elmt) = (14/4)
Total dataset datatype count: 1
-Small # of attributes:
+Small # of attributes (objects with 1 to 10 attributes):
Total # of objects with small # of attributes: 0
Attribute bins:
# of objects with 100 - 999 attributes: 1
Total # of objects with attributes: 1
Max. # of attributes to objects: 100
Summary of file space information:
- File metadata: 6361757 bytes
+ File metadata: 6361689 bytes
Raw data: 0 bytes
- Unaccounted space: 1324 bytes
-Total space: 6363081 bytes
+ Unaccounted space: 6202 bytes
+Total space: 6367891 bytes
diff --git a/tools/h5stat/testfiles/h5stat_newgrat.h5 b/tools/h5stat/testfiles/h5stat_newgrat.h5
index 8fa406b..fc8433d 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat.h5
+++ b/tools/h5stat/testfiles/h5stat_newgrat.h5
Binary files differ
diff --git a/tools/h5stat/testfiles/h5stat_nofile.ddl b/tools/h5stat/testfiles/h5stat_nofile.ddl
new file mode 100644
index 0000000..7b98be4
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_nofile.ddl
@@ -0,0 +1,27 @@
+#############################
+Expected output for 'h5stat '
+#############################
+Usage: h5stat [OPTIONS] file
+
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -V, --version Print version number and exit
+ -f, --file Print file information
+ -F, --filemetadata Print file space information for file's metadata
+ -g, --group Print group information
+ -l N, --links=N Set the threshold for the # of links when printing
+ information for small groups. N is an integer greater
+ than 0. The default threshold is 10.
+ -G, --groupmetadata Print file space information for groups' metadata
+ -d, --dset Print dataset information
+ -m N, --dims=N Set the threshold for the dimension sizes when printing
+ information for small datasets. N is an integer greater
+ than 0. The default threshold is 10.
+ -D, --dsetmetadata Print file space information for datasets' metadata
+ -T, --dtypemetadata Print datasets' datatype information
+ -A, --attribute Print attribute information
+ -a N, --numattrs=N Set the threshold for the # of attributes when printing
+ information for small # of attributes. N is an integer greater
+ than 0. The default threshold is 10.
+ -S, --summary Print summary of file space information
+h5stat error: missing file name
diff --git a/tools/h5stat/testfiles/h5stat_numattrs1.ddl b/tools/h5stat/testfiles/h5stat_numattrs1.ddl
new file mode 100644
index 0000000..bee1d29
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_numattrs1.ddl
@@ -0,0 +1,18 @@
+#############################
+Expected output for 'h5stat -AS -a 10 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Small # of attributes (objects with 1 to 10 attributes):
+ # of objects with 1 attributes: 2
+ # of objects with 10 attributes: 1
+ Total # of objects with small # of attributes: 3
+Attribute bins:
+ # of objects with 1 - 9 attributes: 2
+ # of objects with 10 - 99 attributes: 3
+ Total # of objects with attributes: 5
+ Max. # of attributes to objects: 25
+Summary of file space information:
+ File metadata: 16032 bytes
+ Raw data: 0 bytes
+ Unaccounted space: 280 bytes
+Total space: 16312 bytes
diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl
new file mode 100644
index 0000000..29a09d0
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl
@@ -0,0 +1,96 @@
+#############################
+Expected output for 'h5stat -a 1 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+File information
+ # of unique groups: 4
+ # of unique datasets: 23
+ # of unique named datatypes: 0
+ # of unique links: 0
+ # of unique other: 0
+ Max. # of links to object: 1
+ Max. # of objects in group: 10
+File space information for file metadata (in bytes):
+ Superblock extension: 0
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 3576/0
+ Datasets(exclude compact data): 7896/2912
+ Datatypes: 0/0
+ Groups:
+ B-tree/List: 3816
+ Heap: 744
+ Attributes:
+ B-tree/List: 0
+ Heap: 0
+ Chunked datasets:
+ Index: 0
+ Datasets:
+ Heap: 0
+ Shared Messages:
+ Header: 0
+ B-tree/List: 0
+ Heap: 0
+Small groups (with 0 to 9 links):
+ # of groups with 0 link(s): 1
+ # of groups with 7 link(s): 1
+ # of groups with 9 link(s): 1
+ Total # of small groups: 3
+Group bins:
+ # of groups with 0 link: 1
+ # of groups with 1 - 9 links: 2
+ # of groups with 10 - 99 links: 1
+ Total # of groups: 4
+Dataset dimension information:
+ Max. rank of datasets: 2
+ Dataset ranks:
+ # of dataset with rank 0: 2
+ # of dataset with rank 1: 20
+ # of dataset with rank 2: 1
+1-D Dataset information:
+ Max. dimension size of 1-D datasets: 6
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ # of datasets with dimension sizes 0: 1
+ # of datasets with dimension sizes 6: 19
+ Total # of small datasets: 20
+ 1-D Dataset dimension bins:
+ # of datasets with dimension size 0: 1
+ # of datasets with dimension size 1 - 9: 19
+ Total # of datasets: 20
+Dataset storage information:
+ Total raw data size: 0
+ Total external raw data size: 0
+Dataset layout information:
+ Dataset layout counts[COMPACT]: 0
+ Dataset layout counts[CONTIG]: 23
+ Dataset layout counts[CHUNKED]: 0
+ Number of external files : 0
+Dataset filters information:
+ Number of datasets with:
+ NO filter: 23
+ GZIP filter: 0
+ SHUFFLE filter: 0
+ FLETCHER32 filter: 0
+ SZIP filter: 0
+ NBIT filter: 0
+ SCALEOFFSET filter: 0
+ USER-DEFINED filter: 0
+Dataset datatype information:
+ # of unique datatypes used by datasets: 1
+ Dataset datatype #0:
+ Count (total/named) = (23/0)
+ Size (desc./elmt) = (14/1)
+ Total dataset datatype count: 23
+Small # of attributes (objects with 1 to 1 attributes):
+ # of objects with 1 attributes: 2
+ Total # of objects with small # of attributes: 2
+Attribute bins:
+ # of objects with 1 - 9 attributes: 2
+ # of objects with 10 - 99 attributes: 3
+ Total # of objects with attributes: 5
+ Max. # of attributes to objects: 25
+Summary of file space information:
+ File metadata: 16032 bytes
+ Raw data: 0 bytes
+ Unaccounted space: 280 bytes
+Total space: 16312 bytes
diff --git a/tools/h5stat/testfiles/h5stat_numattrs3.ddl b/tools/h5stat/testfiles/h5stat_numattrs3.ddl
new file mode 100644
index 0000000..515b76c
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_numattrs3.ddl
@@ -0,0 +1,15 @@
+#############################
+Expected output for 'h5stat -A --numattrs=25 h5stat_threshold.h5'
+#############################
+Filename: h5stat_threshold.h5
+Small # of attributes (objects with 1 to 25 attributes):
+ # of objects with 1 attributes: 2
+ # of objects with 10 attributes: 1
+ # of objects with 11 attributes: 1
+ # of objects with 25 attributes: 1
+ Total # of objects with small # of attributes: 5
+Attribute bins:
+ # of objects with 1 - 9 attributes: 2
+ # of objects with 10 - 99 attributes: 3
+ Total # of objects with attributes: 5
+ Max. # of attributes to objects: 25
diff --git a/tools/h5stat/testfiles/h5stat_numattrs4.ddl b/tools/h5stat/testfiles/h5stat_numattrs4.ddl
new file mode 100644
index 0000000..515a4a9
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_numattrs4.ddl
@@ -0,0 +1,11 @@
+#############################
+Expected output for 'h5stat -A -a 100 h5stat_newgrat.h5'
+#############################
+Filename: h5stat_newgrat.h5
+Small # of attributes (objects with 1 to 100 attributes):
+ # of objects with 100 attributes: 1
+ Total # of objects with small # of attributes: 1
+Attribute bins:
+ # of objects with 100 - 999 attributes: 1
+ Total # of objects with attributes: 1
+ Max. # of attributes to objects: 100
diff --git a/tools/h5stat/testfiles/h5stat_threshold.h5 b/tools/h5stat/testfiles/h5stat_threshold.h5
new file mode 100644
index 0000000..ae9fff6
--- /dev/null
+++ b/tools/h5stat/testfiles/h5stat_threshold.h5
Binary files differ
diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl
index 1f16f03..f9f3924 100644
--- a/tools/h5stat/testfiles/h5stat_tsohm.ddl
+++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl
@@ -31,11 +31,11 @@ File space information for file metadata (in bytes):
Header: 38
B-tree/List: 550
Heap: 1279
-Small groups:
- # of groups of size 3: 1
+Small groups (with 0 to 9 links):
+ # of groups with 3 link(s): 1
Total # of small groups: 1
Group bins:
- # of groups of size 1 - 9: 1
+ # of groups with 1 - 9 links: 1
Total # of groups: 1
Dataset dimension information:
Max. rank of datasets: 2
@@ -43,8 +43,8 @@ Dataset dimension information:
# of dataset with rank 2: 3
1-D Dataset information:
Max. dimension size of 1-D datasets: 0
- Small 1-D datasets:
- Total small datasets: 0
+ Small 1-D datasets (with dimension sizes 0 to 9):
+ Total # of small datasets: 0
Dataset storage information:
Total raw data size: 0
Total external raw data size: 0
@@ -69,7 +69,7 @@ Dataset datatype information:
Count (total/named) = (3/0)
Size (desc./elmt) = (14/8)
Total dataset datatype count: 3
-Small # of attributes:
+Small # of attributes (objects with 1 to 10 attributes):
Total # of objects with small # of attributes: 0
Attribute bins:
Total # of objects with attributes: 0