All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yy.httpproxy.stats.Performance Maven / Gradle / Ivy

There is a newer version: 1.1.28
Show newest version
package com.yy.httpproxy.stats;

/**
 * Created by xuduo on 1/8/16.
 */
public class Performance {

    public long successCount;
    public long errorCount;
    public long totalLatency;
    public String path;

    public void addError() {
        errorCount++;
    }

    public void addSuccess(long latency) {
        successCount++;
        this.totalLatency += latency;
    }

    @Override
    public String toString() {
        return "Performance{" +
                "successCount=" + successCount +
                ", errorCount=" + errorCount +
                ", totalLatency=" + totalLatency +
                '}';
    }

    public void add(int successCount, int errorCount, int latency) {
        this.successCount += successCount;
        this.errorCount += errorCount;
        this.totalLatency += latency;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy