diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-04-30 15:54:52 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-04-30 15:54:52 (GMT) |
commit | cc2184b6efd25633b8a27cb23d57380e2f28a5b4 (patch) | |
tree | 6b276ffc0f426d101a06c84d271e64e882fa66a9 /bin/iostats | |
parent | 2be6b9f63c53e20add431b497a13929d2df049a8 (diff) | |
download | hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.zip hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.gz hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.bz2 |
[svn-r1240] Changes since 19990427
----------------------
./tools/h5ls.c
Added a `--address' (`-a') switch which causes h5ls to display
file addresses for raw data. For contiguous datasets it's just
a nice simple number, but for chunked datasets it's a list of
logical dataset coordinates, file addresses, filter masks, and
storage sizes.
Changed `--dump' switch to `--data'.
./src/H5D.c
./src/H5F.c
./src/H5Fprivate.h
Enhanced the indexed-storage B-tree iterator so it can dump
raw data addresses (and other info) to the standard error
stream.
Added H5Ddebug() so h5ls has a way to dump addresses for
datasets. I'm not sure what else this API function should do,
so I think we should discuss it before we document it. So far,
h5ls is the only thing that uses it, and we can easily change
that.
./src/H5Tconv.c
./test/dtypes.c
Finally had a chance to verify Paul's H5T_conv_s_s (general
string to string conversions) bug fixes and incorporate them
into H5T_conv_f_f (general floating-point to floating-point
conversions) and H5T_conv_i_i (general integer to integer
conversons). Thanks Paul.
./src/H5D.c
./src/H5S.c
./src/H5Sprivate.h
Added performance timers around data space read and write
callbacks. They were already there for the gather/scatter
callbacks.
The timings for read/write callbacks are displayed along with
gather/scatter when data space debugging is turned on.
./bin/iostats
Updated to print totals. Added a `--fast' option that doesn't
do any output except the totals and is much faster.
./bin/trace
Changed __unused__ to UNUSED to match source code.
./config/gnu-flags
Updated error message for pgcc. I've sent bug reports to the
pgcc people but the new version still has the same bug.
./configure.in
./config/conclude.in
./config/depend.in
Fixed dependencies for non-GNU makes when run in a directory
other than the hdf5 source tree.
Updated GNU `make dep' rules to copy the distributed
dependencies for non-GNU makes into the source tree when run
in some other directory.
Diffstat (limited to 'bin/iostats')
-rwxr-xr-x | bin/iostats | 88 |
1 files changed, 59 insertions, 29 deletions
diff --git a/bin/iostats b/bin/iostats index d55d550..0e96e29 100755 --- a/bin/iostats +++ b/bin/iostats @@ -3,51 +3,81 @@ # Usage: pipe the output of Linux's `strace' program into the stdin of # this command, and the output of this command into gnuplot. +my ($fast,$npasses); +if ($ARGV[0] =~ /^--?fast$/) { + $fast = 1; + shift; +} + my $filename = shift || "tstab2.h5"; my $total = 0; my %What; # What{pos}{nbytes}{r|w} = naccesses +my($total_writes, $total_bytes_out, $total_reads, $total_bytes_in); while (<>) { - if (!defined $fd) { - if (/^open\("(.*?)".*=\s+(\d+)/ && $1 eq $filename) { - $fd = $2; - $pos = 0; - } - } elsif (/^close\((\d+)/ && $1==$fd) { - $fd = undef; - } elsif (/^lseek\((\d+), -?\d+,.*= (\d+)/ && - $1==$fd && $2>=0) { - $pos = $2; - } elsif (/^lseek\((\d+),/ && $1==$fd) { - die $_; - } elsif (/^write\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ && - $1==$fd && $3>=0) { - my $nbytes = $3; + if (!defined $fd) { + if (/^open\("(.*?)".*=\s+(\d+)/ && $1 eq $filename) { + $fd = $2; + $pos = 0; + } + } elsif (/^close\((\d+)/ && $1==$fd) { + $fd = undef; + } elsif (!$fast && + /^lseek\((\d+), -?\d+,.*= (\d+)/ && + $1==$fd && $2>=0) { + $pos = $2; + } elsif (!$fast && /^lseek\((\d+),/ && $1==$fd) { + die $_; + } elsif (/^write\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ && + $1==$fd && $3>=0) { + my $nbytes = $3; + if ($fast) { + $total_writes++; + $total_bytes_out += $nbytes; + } else { $What{$pos}{$nbytes}{w}++; printf "%d %d\n", $total, $pos; $pos += $nbytes; $total += $nbytes; - } elsif (/^write\((\d+),/ && $1==$fd) { - die $_; - } elsif (/^read\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ && - $1==$fd && $3>=0) { - my $nbytes = $3; + } + } elsif (/^write\((\d+),/ && $1==$fd) { + die $_; + } elsif (/^read\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ && + $1==$fd && $3>=0) { + my $nbytes = $3; + if ($fast) { + $total_reads++; + $total_bytes_in += $nbytes; + } else { $What{$pos}{$nbytes}{r}++; printf "%d %d\n", $total, $pos; $pos += $nbytes; $total += $nbytes; - } elsif (/^read\((\d+),/ && $1==$fd) { - die $_; - } + } + } elsif (/^read\((\d+),/ && $1==$fd) { + die $_; + } } -print "="x36, "\n"; +if (!$fast) { + print "="x36, "\n"; printf "%8s %8s %8s %8s\n","Position","NBytes","NReads","NWrites"; -for $pos (sort {$a<=>$b} keys %What) { - for $nbytes (sort {$a<=>$b} keys %{$What{$pos}}) { - printf "%8d %8d %8d %8d\n", $pos, $nbytes, - $What{$pos}{$nbytes}{r}, - $What{$pos}{$nbytes}{w}; + for $pos (sort {$a<=>$b} keys %What) { + for $nbytes (sort {$a<=>$b} keys %{$What{$pos}}) { + printf("%8d %8d %8d %8d\n", $pos, $nbytes, + $What{$pos}{$nbytes}{r}, + $What{$pos}{$nbytes}{w}); + $total_writes += $What{$pos}{$nbytes}{w}; + $total_reads += $What{$pos}{$nbytes}{r}; + $total_bytes_out += $What{$pos}{$nbytes}{w} * $nbytes; + $total_bytes_in += $What{$pos}{$nbytes}{r} * $nbytes; + } } } + +print "="x36, "\n"; +printf("Write: %8d calls, %10d total bytes, %10g average bytes\n", + $total_writes, $total_bytes_out, $total_bytes_out/$total_writes); +printf("Read: %8d calls, %10d total bytes, %10g average bytes\n", + $total_reads, $total_bytes_in, $total_bytes_in/$total_reads); |