diff options
author | Dave Borowitz <dborowitz@google.com> | 2018-01-11 13:14:02 -0500 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-02-22 16:27:09 +0900 |
commit | 879372eb72d8b8a073f4f73d98caa1cd15971bd5 (patch) | |
tree | 0ce0484415722a2468c0c853195348b84b127105 /org.eclipse.jgit | |
parent | 49cb6ba5dd337dfdc9302bb33248e8448f530d3d (diff) | |
download | jgit-879372eb72d8b8a073f4f73d98caa1cd15971bd5.tar.gz jgit-879372eb72d8b8a073f4f73d98caa1cd15971bd5.zip |
DfsReaderIoStats: Clarify that "blocks" are really cache misses
The previous wording was ambiguous as to whether these were blocks
requested from the cache (hits + misses) or read from underlying storage
(misses only).
They are in fact recording only misses:
Accumulator#{readBlock,readBlockBytes,readBlockMicros} are only
incremented from BlockBasedFile#readOneBlock, which is only called from
the cache miss path in DfsBlockCache#getOrLoad (line 391).
Change-Id: I0135cd1e76d09c1e28e0f1833b34c312511c66ce
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java index cf925c914d..c35801f3b0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java @@ -67,10 +67,16 @@ public class DfsReaderIoStats { /** Total number of block cache hits. */ long blockCacheHit; - /** Total number of discrete blocks read from pack file(s). */ + /** + * Total number of discrete blocks actually read from pack file(s), that is, + * block cache misses. + */ long readBlock; - /** Total number of compressed bytes read as block sized units. */ + /** + * Total number of compressed bytes read during cache misses, as block sized + * units. + */ long readBlockBytes; /** Total microseconds spent reading {@link #readBlock} blocks. */ @@ -144,7 +150,8 @@ public class DfsReaderIoStats { } /** - * Get total number of discrete blocks read from pack file(s). + * Get total number of discrete blocks actually read from pack file(s), that + * is, block cache misses. * * @return total number of discrete blocks read from pack file(s). */ @@ -153,7 +160,8 @@ public class DfsReaderIoStats { } /** - * Get total number of compressed bytes read as block sized units. + * Get total number of compressed bytes read during cache misses, as block + * sized units. * * @return total number of compressed bytes read as block sized units. */ @@ -162,7 +170,7 @@ public class DfsReaderIoStats { } /** - * Get total microseconds spent reading blocks. + * Get total microseconds spent reading blocks during cache misses. * * @return total microseconds spent reading blocks. */ |