Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.dfs

pack-priv Class DfsBlockCacheStats

extends Object
implements BlockCacheStats
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats
Static Imports
org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats

Keeps track of stats for a Block Cache table.

Field Summary

Modifier and TypeField and Description
private final AtomicReference<AtomicLong[]>
liveBytes

Number of bytes currently loaded in the cache, per pack file extension.

private final String
private final AtomicReference<AtomicLong[]>
statEvict

Number of blocks evicted due to cache being full, per pack file extension.

private final AtomicReference<AtomicLong[]>
statHit

Number of times a block was found in the cache, per pack file extension.

private final AtomicReference<AtomicLong[]>
statMiss

Number of times a block was not found, and had to be loaded, per pack file extension.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addToLiveBytes(DfsStreamKey
key identifying which liveBytes entry to update.
key
,
long
amount to increment the count by.
size
)

Add size to the liveBytes count.

public long[]
getCurrentSize()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getCurrentSize.

Get total number of bytes in the cache, per pack file extension.

public long[]
getEvictions()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getEvictions.

Get number of evictions performed due to cache being full, per pack file extension.

public long[]
getHitCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getHitCount.

Get number of requests for items in the cache, per pack file extension.

public long[]
public long[]
getMissCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getMissCount.

Get number of requests for items not in the cache, per pack file extension.

public String
getName()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getName.

Get the name of the block cache generating this instance.

private static AtomicLong
private static long[]
public long[]
getTotalRequestCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getTotalRequestCount.

Get total number of requests (hit + miss), per pack file extension.

pack-priv void
incrementEvict(DfsStreamKey
key identifying which liveBytes entry to update.
key
)

Increment the statEvict count.

pack-priv void
incrementHit(DfsStreamKey
key identifying which liveBytes entry to update.
key
)

Increment the statHit count.

pack-priv void
incrementMiss(DfsStreamKey
key identifying which liveBytes entry to update.
key
)

Increment the statMiss count.

private static AtomicLong[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

liveBytesback to summary
private final AtomicReference<AtomicLong[]> liveBytes

Number of bytes currently loaded in the cache, per pack file extension.

nameback to summary
private final String name
statEvictback to summary
private final AtomicReference<AtomicLong[]> statEvict

Number of blocks evicted due to cache being full, per pack file extension.

statHitback to summary
private final AtomicReference<AtomicLong[]> statHit

Number of times a block was found in the cache, per pack file extension.

statMissback to summary
private final AtomicReference<AtomicLong[]> statMiss

Number of times a block was not found, and had to be loaded, per pack file extension.

Constructor Detail

DfsBlockCacheStatsback to summary
pack-priv DfsBlockCacheStats()
DfsBlockCacheStatsback to summary
pack-priv DfsBlockCacheStats(String name)

Method Detail

addToLiveBytesback to summary
pack-priv void addToLiveBytes(DfsStreamKey key, long size)

Add size to the liveBytes count.

Parameters
key:DfsStreamKey

key identifying which liveBytes entry to update.

size:long

amount to increment the count by.

getCurrentSizeback to summary
public long[] getCurrentSize()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getCurrentSize.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getCurrentSize.

Get total number of bytes in the cache, per pack file extension.

Returns:long[]

total number of bytes in the cache, per pack file extension.

Annotations
@Override
getEvictionsback to summary
public long[] getEvictions()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getEvictions.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getEvictions.

Get number of evictions performed due to cache being full, per pack file extension.

Returns:long[]

the number of evictions performed due to cache being full, per pack file extension.

Annotations
@Override
getHitCountback to summary
public long[] getHitCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getHitCount.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getHitCount.

Get number of requests for items in the cache, per pack file extension.

Returns:long[]

the number of requests for items in the cache, per pack file extension.

Annotations
@Override
getHitRatioback to summary
public long[] getHitRatio()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getHitRatio.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getHitRatio.

Get hit ratios.

Returns:long[]

hit ratios.

Annotations
@Override
getMissCountback to summary
public long[] getMissCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getMissCount.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getMissCount.

Get number of requests for items not in the cache, per pack file extension.

Returns:long[]

the number of requests for items not in the cache, per pack file extension.

Annotations
@Override
getNameback to summary
public String getName()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getName.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getName.

Get the name of the block cache generating this instance.

Returns:String

this cache's name.

Annotations
@Override
getStatback to summary
private static AtomicLong getStat(AtomicReference<AtomicLong[]> stats, DfsStreamKey key)
getStatValsback to summary
private static long[] getStatVals(AtomicReference<AtomicLong[]> stat)
getTotalRequestCountback to summary
public long[] getTotalRequestCount()

Implements org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getTotalRequestCount.

Doc from org.eclipse.jgit.internal.storage.dfs.DfsBlockCacheTable.BlockCacheStats.getTotalRequestCount.

Get total number of requests (hit + miss), per pack file extension.

Returns:long[]

total number of requests (hit + miss), per pack file extension.

Annotations
@Override
incrementEvictback to summary
pack-priv void incrementEvict(DfsStreamKey key)

Increment the statEvict count.

Parameters
key:DfsStreamKey

key identifying which liveBytes entry to update.

incrementHitback to summary
pack-priv void incrementHit(DfsStreamKey key)

Increment the statHit count.

Parameters
key:DfsStreamKey

key identifying which liveBytes entry to update.

incrementMissback to summary
pack-priv void incrementMiss(DfsStreamKey key)

Increment the statMiss count.

Parameters
key:DfsStreamKey

key identifying which liveBytes entry to update.

newCountersback to summary
private static AtomicLong[] newCounters()