Class PackWriter.Statistics
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.pack.PackWriter.Statistics
-
- Enclosing class:
- PackWriter
public static class PackWriter.Statistics extends Object
Summary of how PackWriter created the pack.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PackWriter.Statistics.ObjectType
Statistics about a single class of object.
-
Constructor Summary
Constructors Constructor Description Statistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PackWriter.Statistics.ObjectType
byObjectType(int typeCode)
int
getDeltaSearchNonEdgeObjects()
int
getDeltasFound()
int
getDepth()
Set<ObjectId>
getInterestingObjects()
String
getMessage()
long
getReusedDeltas()
long
getReusedObjects()
Collection<CachedPack>
getReusedPacks()
long
getThinPackBytes()
long
getTimeCompressing()
long
getTimeCounting()
long
getTimeSearchingForReuse()
long
getTimeSearchingForSizes()
long
getTimeTotal()
long
getTimeWriting()
long
getTotalBytes()
long
getTotalDeltas()
long
getTotalObjects()
double
getTransferRate()
Set<ObjectId>
getUninterestingObjects()
boolean
isShallow()
-
-
-
Method Detail
-
getInterestingObjects
public Set<ObjectId> getInterestingObjects()
- Returns:
- unmodifiable collection of objects to be included in the pack. May be null if the pack was hand-crafted in a unit test.
-
getUninterestingObjects
public Set<ObjectId> getUninterestingObjects()
- Returns:
- unmodifiable collection of objects that should be excluded from the pack, as the peer that will receive the pack already has these objects.
-
getReusedPacks
public Collection<CachedPack> getReusedPacks()
- Returns:
- unmodifiable collection of the cached packs that were reused in the output, if any were selected for reuse.
-
getDeltaSearchNonEdgeObjects
public int getDeltaSearchNonEdgeObjects()
- Returns:
- number of objects in the output pack that went through the delta search process in order to find a potential delta base.
-
getDeltasFound
public int getDeltasFound()
- Returns:
- number of objects in the output pack that went through delta
base search and found a suitable base. This is a subset of
getDeltaSearchNonEdgeObjects()
.
-
getTotalObjects
public long getTotalObjects()
- Returns:
- total number of objects output. This total includes the value
of
getTotalDeltas()
.
-
getTotalDeltas
public long getTotalDeltas()
- Returns:
- total number of deltas output. This may be lower than the actual number of deltas if a cached pack was reused.
-
getReusedObjects
public long getReusedObjects()
- Returns:
- number of objects whose existing representation was reused in
the output. This count includes
getReusedDeltas()
.
-
getReusedDeltas
public long getReusedDeltas()
- Returns:
- number of deltas whose existing representation was reused in the output, as their base object was also output or was assumed present for a thin pack. This may be lower than the actual number of reused deltas if a cached pack was reused.
-
getTotalBytes
public long getTotalBytes()
- Returns:
- total number of bytes written. This size includes the pack header, trailer, thin pack, and reused cached pack(s).
-
getThinPackBytes
public long getThinPackBytes()
- Returns:
- size of the thin pack in bytes, if a thin pack was generated. A thin pack is created when the client already has objects and some deltas are created against those objects, or if a cached pack is being used and some deltas will reference objects in the cached pack. This size does not include the pack header or trailer.
-
byObjectType
public PackWriter.Statistics.ObjectType byObjectType(int typeCode)
- Parameters:
typeCode
- object type code, e.g. OBJ_COMMIT or OBJ_TREE.- Returns:
- information about this type of object in the pack.
-
isShallow
public boolean isShallow()
- Returns:
- true if the resulting pack file was a shallow pack.
-
getDepth
public int getDepth()
- Returns:
- depth (in commits) the pack includes if shallow.
-
getTimeCounting
public long getTimeCounting()
- Returns:
- time in milliseconds spent enumerating the objects that need to be included in the output. This time includes any restarts that occur when a cached pack is selected for reuse.
-
getTimeSearchingForReuse
public long getTimeSearchingForReuse()
- Returns:
- time in milliseconds spent matching existing representations against objects that will be transmitted, or that the client can be assumed to already have.
-
getTimeSearchingForSizes
public long getTimeSearchingForSizes()
- Returns:
- time in milliseconds spent finding the sizes of all objects that will enter the delta compression search window. The sizes need to be known to better match similar objects together and improve delta compression ratios.
-
getTimeCompressing
public long getTimeCompressing()
- Returns:
- time in milliseconds spent on delta compression. This is observed wall-clock time and does not accurately track CPU time used when multiple threads were used to perform the delta compression.
-
getTimeWriting
public long getTimeWriting()
- Returns:
- time in milliseconds spent writing the pack output, from
start of header until end of trailer. The transfer speed can
be approximated by dividing
getTotalBytes()
by this value.
-
getTimeTotal
public long getTimeTotal()
- Returns:
- total time spent processing this pack.
-
getTransferRate
public double getTransferRate()
- Returns:
- get the average output speed in terms of bytes-per-second.
getTotalBytes() / (getTimeWriting() / 1000.0)
.
-
getMessage
public String getMessage()
- Returns:
- formatted message string for display to clients.
-
-