/** * Get statistics of what this PackWriter did in order to create the final * pack stream. * * @return description of what this PackWriter did in order to create the * final pack stream. This should only be invoked after the calls to * create the pack/index/bitmap have completed. */ public PackStatistics getStatistics() { return new PackStatistics(stats); }
/** * Get the average output speed in terms of bytes-per-second. * * @return the average output speed in terms of bytes-per-second. * {@code getTotalBytes() / (getTimeWriting() / 1000.0)}. */ public double getTransferRate() { return getTotalBytes() / (getTimeWriting() / 1000.0); }
DfsPackDescription setPackStats(PackStatistics stats) { this.packStats = stats; setFileSize(PACK, stats.getTotalBytes()); setObjectCount(stats.getTotalObjects()); setDeltaCount(stats.getTotalDeltas()); return this; }
packTransferTime = writer.getStatistics().getTimeWriting();
/** @return formatted message string for display to clients. */ public String getMessage() { return statistics.getMessage(); } }
/** * @return total number of objects output. This total includes the value * of {@link #getTotalDeltas()}. */ public long getTotalObjects() { return statistics.getTotalObjects(); }
/** * @return total number of bytes written. This size includes the pack * header, trailer, thin pack, and reused cached pack(s). */ public long getTotalBytes() { return statistics.getTotalBytes(); }
/** * @return total number of deltas output. This may be lower than the * actual number of deltas if a cached pack was reused. */ public long getTotalDeltas() { return statistics.getTotalDeltas(); }
/** * @return the count of objects that needed to be discovered through an * object walk because they were not found in bitmap indices. * Returns -1 if no bitmap indices were found. * * @since 4.0 */ public long getBitmapIndexMisses() { return statistics.getBitmapIndexMisses(); }
/** * @return number of objects in the output pack that went through the * delta search process in order to find a potential delta base. */ public int getDeltaSearchNonEdgeObjects() { return statistics.getDeltaSearchNonEdgeObjects(); }
/** * @param typeCode * object type code, e.g. OBJ_COMMIT or OBJ_TREE. * @return information about this type of object in the pack. */ public ObjectType byObjectType(int typeCode) { return new ObjectType(statistics.byObjectType(typeCode)); }
/** * @return time in milliseconds spent writing the pack output, from * start of header until end of trailer. The transfer speed can * be approximated by dividing {@link #getTotalBytes()} by this * value. */ public long getTimeWriting() { return statistics.getTimeWriting(); }
String msg = pw.getStatistics().getMessage() + '\n'; msgOut.write(Constants.encode(msg)); msgOut.flush();
DfsPackDescription setPackStats(PackStatistics stats) { this.stats = stats; setFileSize(PACK, stats.getTotalBytes()); setObjectCount(stats.getTotalObjects()); setDeltaCount(stats.getTotalDeltas()); return this; }
/** * @return get the average output speed in terms of bytes-per-second. * {@code getTotalBytes() / (getTimeWriting() / 1000.0)}. */ public double getTransferRate() { return getTotalBytes() / (getTimeWriting() / 1000.0); }
packTransferTime = writer.getStatistics().getTimeWriting();
String msg = pw.getStatistics().getMessage() + '\n'; msgOut.write(Constants.encode(msg)); msgOut.flush();
/** * Get statistics of what this PackWriter did in order to create the final * pack stream. * * @return description of what this PackWriter did in order to create the * final pack stream. This should only be invoked after the calls to * create the pack/index/bitmap have completed. */ public PackStatistics getStatistics() { return new PackStatistics(stats); }
DfsPackDescription setPackStats(PackStatistics stats) { this.packStats = stats; setFileSize(PACK, stats.getTotalBytes()); setObjectCount(stats.getTotalObjects()); setDeltaCount(stats.getTotalDeltas()); return this; }
/** * Get the average output speed in terms of bytes-per-second. * * @return the average output speed in terms of bytes-per-second. * {@code getTotalBytes() / (getTimeWriting() / 1000.0)}. */ public double getTransferRate() { return getTotalBytes() / (getTimeWriting() / 1000.0); }