Example usage for org.eclipse.jgit.storage.pack PackStatistics getUninterestingObjects

List of usage examples for org.eclipse.jgit.storage.pack PackStatistics getUninterestingObjects

Introduction

In this page you can find the example usage for org.eclipse.jgit.storage.pack PackStatistics getUninterestingObjects.

Prototype

public Set<ObjectId> getUninterestingObjects() 

Source Link

Document

Get unmodifiable collection of objects that should be excluded from the pack

Usage

From source file:com.google.gerrit.server.git.UploadPackMetricsHook.java

License:Apache License

@Override
public void onPostUpload(PackStatistics stats) {
    Operation op = Operation.FETCH;
    if (stats.getUninterestingObjects() == null || stats.getUninterestingObjects().isEmpty()) {
        op = Operation.CLONE;/* w  w w .  jav  a2  s .  c  o  m*/
    }

    requestCount.increment(op);
    counting.record(op, stats.getTimeCounting(), MILLISECONDS);
    compressing.record(op, stats.getTimeCompressing(), MILLISECONDS);
    writing.record(op, stats.getTimeWriting(), MILLISECONDS);
    packBytes.record(op, stats.getTotalBytes());
}