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

com.deep007.goniub.proxy.test.ProxyReport Maven / Gradle / Ivy

Go to download

基于selenium、browserproxy、okhttp等研发的工具包,方便使用。够牛逼!

There is a newer version: 2.0.2
Show newest version
package com.deep007.goniub.proxy.test;

import java.util.ArrayList;
import java.util.List;

public class ProxyReport {
	public String proxyIp;
	public int proxyPort;
	public long totalUseTime;
	public long averageUseTime;
	public int successTimes;
	public int failureTimes;
	public int totalTimes;
	private List list = new ArrayList<>();
	public void addRequestReport(RequestReport testReport) {
		if (testReport != null) {
			if (testReport.success) {
				totalUseTime += testReport.useTime;
				successTimes ++;
				if (successTimes > 0) {
					averageUseTime = totalUseTime / successTimes;
				}
			}else {
				failureTimes ++;
			}
			totalTimes ++;
			list.add(testReport);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy