public class PackStatistics extends Object
PackWriter
pack creation.Modifier and Type | Class and Description |
---|---|
static class |
PackStatistics.Accumulator
POJO for accumulating the statistics.
|
static class |
PackStatistics.ObjectType
Statistics about a single type of object (commits, tags, trees and
blobs).
|
Constructor and Description |
---|
PackStatistics(PackStatistics.Accumulator accumulator)
Creates a new
PackStatistics object
from the accumulator. |
Modifier and Type | Method and Description |
---|---|
PackStatistics.ObjectType |
byObjectType(int typeCode)
Get information about this type of object in the pack.
|
long |
getAdvertised()
Get the count of references in the ref advertisement.
|
long |
getBitmapIndexMisses()
Get the count of objects that needed to be discovered through an object
walk because they were not found in bitmap indices.
|
Set<ObjectId> |
getClientShallowCommits()
Get unmodifiable collection of objects that were shallow commits on the
client.
|
int |
getDeltaSearchNonEdgeObjects()
Get number of objects in the output pack that went through the delta
search process in order to find a potential delta base.
|
int |
getDeltasFound()
Get number of objects in the output pack that went through delta base
search and found a suitable base.
|
int |
getDepth()
Get depth (in commits) the pack includes if shallow.
|
long |
getHaves()
Get the count of client haves.
|
Set<ObjectId> |
getInterestingObjects()
Get unmodifiable collection of objects to be included in the pack.
|
String |
getMessage()
Get formatted message string for display to clients.
|
Map<Integer,PackStatistics.ObjectType> |
getObjectTypes()
Get a map containing ObjectType statistics.
|
long |
getReusedDeltas()
Get number of deltas whose existing representation was reused in the
output.
|
long |
getReusedObjects()
Get number of objects whose existing representation was reused in the
output.
|
List<CachedPack> |
getReusedPacks()
Get unmodifiable list of the cached packs that were reused in the output
|
Set<ObjectId> |
getRootCommits()
Get unmodifiable collection of the root commits of the history.
|
long |
getThinPackBytes()
Get size of the thin pack in bytes.
|
long |
getTimeCompressing()
Get time in milliseconds spent on delta compression.
|
long |
getTimeCounting()
Get time in milliseconds spent enumerating the objects that need to be
included in the output.
|
long |
getTimeNegotiating()
Time in ms spent in the negotiation phase.
|
long |
getTimeSearchingForReuse()
Get time in milliseconds spent matching existing representations against
objects that will be transmitted.
|
long |
getTimeSearchingForSizes()
Get time in milliseconds spent finding the sizes of all objects that will
enter the delta compression search window.
|
long |
getTimeTotal()
Get total time spent processing this pack.
|
long |
getTimeWriting()
Get time in milliseconds spent writing the pack output, from start of
header until end of trailer.
|
long |
getTotalBytes()
Get total number of bytes written.
|
long |
getTotalDeltas()
Get total number of deltas output.
|
long |
getTotalObjects()
Get total number of objects output.
|
double |
getTransferRate()
Get the average output speed in terms of bytes-per-second.
|
Set<ObjectId> |
getUninterestingObjects()
Get unmodifiable collection of objects that should be excluded from the
pack
|
long |
getWants()
Get the count of client wants.
|
boolean |
isShallow()
Whether the resulting pack file was a shallow pack.
|
public PackStatistics(PackStatistics.Accumulator accumulator)
PackStatistics
object
from the accumulator.accumulator
- the accumulator of the statisticspublic long getAdvertised()
public long getWants()
public long getHaves()
public long getTimeNegotiating()
public Set<ObjectId> getInterestingObjects()
null
if the pack was hand-crafted in a unit test.public Set<ObjectId> getUninterestingObjects()
public Set<ObjectId> getClientShallowCommits()
public List<CachedPack> getReusedPacks()
public Set<ObjectId> getRootCommits()
public int getDeltaSearchNonEdgeObjects()
public int getDeltasFound()
getDeltaSearchNonEdgeObjects()
.public long getTotalObjects()
getTotalDeltas()
.public long getBitmapIndexMisses()
public long getTotalDeltas()
public long getReusedObjects()
getReusedDeltas()
.public long getReusedDeltas()
public long getTotalBytes()
public long getThinPackBytes()
public PackStatistics.ObjectType byObjectType(int typeCode)
typeCode
- object type code, e.g. OBJ_COMMIT or OBJ_TREE.public boolean isShallow()
true
if the resulting pack file was a shallow pack.public int getDepth()
public long getTimeCounting()
public long getTimeSearchingForReuse()
public long getTimeSearchingForSizes()
public long getTimeCompressing()
public long getTimeWriting()
getTotalBytes()
by this value.public long getTimeTotal()
public double getTransferRate()
getTotalBytes() / (getTimeWriting() / 1000.0)
.public String getMessage()
public Map<Integer,PackStatistics.ObjectType> getObjectTypes()
Copyright © 2019 Eclipse JGit Project. All rights reserved.