summaryrefslogtreecommitdiffstats
path: root/tools/h5ls.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-04-23 12:31:21 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-04-23 12:31:21 (GMT)
commitd534a4dd0d1e646c531a31a5eb04842dfde5f470 (patch)
tree47b946b229d929139cf0fcad389e790d6a382e70 /tools/h5ls.c
parent94dd2f5b3d93c2e14ef2491e70a09a836affdf4c (diff)
downloadhdf5-d534a4dd0d1e646c531a31a5eb04842dfde5f470.zip
hdf5-d534a4dd0d1e646c531a31a5eb04842dfde5f470.tar.gz
hdf5-d534a4dd0d1e646c531a31a5eb04842dfde5f470.tar.bz2
[svn-r1204] Changes since 19990415
---------------------- ./config/depend.in Fixed automatic dependencies. We were storing dependencies for *.o files instead of *.lo files after shared libraries were added. ./config/gnu-flags ./config/linux-gnulibc1 Moved `-march=pentiumpro -mcpu=pentiumpro -malign-double' from the linux file to this file and caused it to depend on the CPU name. This fixes one of Elena's bugs. ./src/H5B.c ./src/H5Bprivate.h ./src/H5D.c ./src/H5Dprivate.h ./src/H5Dpublic.h ./src/H5F.c ./src/H5Farray.c ./src/H5Fistore.c ./src/H5Fmpio.c ./src/H5Fprivate.h ./src/H5Fpublic.h ./src/H5Gnode.c ./src/H5P.c ./src/H5RA.c ./src/H5Sall.c ./src/H5Shyper.c ./src/H5Smpio.c ./src/H5Spoint.c ./src/H5Sprivate.h ./src/H5Tpublic.h ./test/istore.c Added an H5Dget_storage_size() function that reports the amount of storage allocated for raw data in a dataset. Changed H5D_xfer_* to H5F_xfer_* because these properties are more general than datasets. This also allows some of the lower-level I/O functions to get this information easier. ./src/H5S.c ./src/H5Sall.c Added two new functions H5S_all_read() and H5S_all_write() which are optimizations that copy data directly between file and memory without having to go through the scatter gather step. This knocks quite a bit of time off the I/O and reading/writing entire datasets is a fairly common operation. ./tools/h5ls.c Reports the logical size of data, the allocated size of data, and the percent utilization. ./MANIFEST Removed old pablo files, added new files. Snapshots should now start to work again. ./src/H5D.c ./src/H5Fmpio.c Removed two warnings signed vs. unsigned comparisons and check for overflow.
Diffstat (limited to 'tools/h5ls.c')
-rw-r--r--tools/h5ls.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/h5ls.c b/tools/h5ls.c
index 43b579e..1e08711 100644
--- a/tools/h5ls.c
+++ b/tools/h5ls.c
@@ -1187,7 +1187,7 @@ dataset_list2(hid_t dset, const char UNUSED *name)
char s[64]; /*temporary string buffer */
off_t f_offset; /*offset in external file */
hsize_t f_size; /*bytes used in external file */
- hsize_t total; /*total size or offset */
+ hsize_t total, used; /*total size or offset */
hsize_t chsize[64]; /*chunk size in elements */
int ndims; /*dimensionality */
int n, max_len; /*max extern file name length */
@@ -1210,6 +1210,18 @@ dataset_list2(hid_t dset, const char UNUSED *name)
printf("} %lu bytes\n", (unsigned long)total);
}
+ /* Print total raw storage size */
+ used = H5Sget_simple_extent_npoints(space) * H5Tget_size(type);
+ total = H5Dget_storage_size(dset);
+ printf(" %-10s ", "Storage:");
+ printf("%lu logical byte%s, %lu allocated byte%s",
+ (unsigned long)used, 1==used?"":"s",
+ (unsigned long)total, 1==total?"":"s");
+ if (total>0) {
+ printf(", %1.2f%% utilization", (used*100.0)/total);
+ }
+ putchar('\n');
+
/* Print information about external strorage */
if ((nf = H5Pget_external_count(dcpl))>0) {
for (i=0, max_len=0; i<nf; i++) {