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

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

Introduction

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

Prototype

public long getTimeCompressing() 

Source Link

Document

Get time in milliseconds spent on delta compression.

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;//from   ww w  .  j ava  2s. co  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());
}