httpperfresult.java

来自「利用Java Socket写的一段通讯协议」· Java 代码 · 共 61 行

JAVA
61
字号
package com.ict.netcom2.result;

public class HttpPerfResult extends MeasureResult {
	/**
	 * test return code
	 */
	public int rstCode;

	/**
	 * test start time
	 */
	public long testTime;

	/**
	 * connect setup time
	 */
	public long connectTime;

	/**
	 * user perceive http connect time
	 */
	public long usrConnTime;

	/**
	 * http server response time
	 */
	public long responseTime;

	/**
	 * user download index html time
	 */
	public long indexGotTime;

	/**
	 * user perceive download index html time
	 */
	public long usrGotTime;

	/**
	 * web page download rate
	 */
	public float downloadRate;
	
	public String toString() {
		String ret = "\n";
		ret += "[HttpPerfResult]*************************************\n";
		ret += "Test return code: "+this.rstCode+"\n";
		ret += "Test start time: "+this.testTime+"\n";
		ret += "Connect setup time: "+this.connectTime+" ms\n";
		ret += "User perceive http connect time: "+this.usrConnTime+" ms\n";
		ret += "Http server response time: "+this.responseTime+" ms\n";
		ret += "User download index html time: "+this.indexGotTime+" ms\n";
		ret += "User perceive download index html time: "+this.usrGotTime+" ms\n";
		ret += "Web page download rate: "+this.downloadRate+" kb/s\n";
		ret += "*****************************************************";
		return ret;
	}

	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?