亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stressregressiontest.java

?? mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序 mysql jdbc驅(qū)動程序
?? JAVA
字號:
/* Copyright (C) 2002-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package testsuite.regression;import java.sql.Connection;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.sql.Timestamp;import java.util.ArrayList;import java.util.Collections;import java.util.Date;import java.util.List;import java.util.Properties;import testsuite.BaseTestCase;/** * Tests for multi-thread stress regressions. *  * @author Mark Matthews * @version $Id: StressRegressionTest.java,v 1.1.2.1 2005/05/13 18:58:38 *          mmatthews Exp $ */public class StressRegressionTest extends BaseTestCase {	private int numThreadsStarted;	/**	 * Creates a new StressRegressionTest	 * 	 * @param name	 *            the name of the test.	 */	public StressRegressionTest(String name) {		super(name);		// TODO Auto-generated constructor stub	}	/**	 * Runs all test cases in this test suite	 * 	 * @param args	 */	public static void main(String[] args) {		junit.textui.TestRunner.run(StressRegressionTest.class);	}	/**	 * 	 * 	 * @throws Exception	 *             ...	 */	public synchronized void testContention() throws Exception {		if (false) {			System.out.println("Calculating baseline elapsed time...");			long start = System.currentTimeMillis();			contentiousWork(this.conn, this.stmt, 0);			long singleThreadElapsedTimeMillis = System.currentTimeMillis()					- start;			System.out.println("Single threaded execution took "					+ singleThreadElapsedTimeMillis + " ms.");			int numThreadsToStart = 95;			System.out.println("\nStarting " + numThreadsToStart + " threads.");			this.numThreadsStarted = numThreadsToStart;			ContentionThread[] threads = new ContentionThread[this.numThreadsStarted];			for (int i = 0; i < numThreadsToStart; i++) {				threads[i] = new ContentionThread(i);				threads[i].start();			}			for (;;) {				try {					wait();					if (this.numThreadsStarted == 0) {						break;					}				} catch (InterruptedException ie) {					// ignore				}			}			// Collect statistics...			System.out.println("Done!");			double avgElapsedTimeMillis = 0;			List elapsedTimes = new ArrayList();			for (int i = 0; i < numThreadsToStart; i++) {				elapsedTimes.add(new Long(threads[i].elapsedTimeMillis));				avgElapsedTimeMillis += ((double) threads[i].elapsedTimeMillis / numThreadsToStart);			}			Collections.sort(elapsedTimes);			System.out.println("Average elapsed time per-thread was "					+ avgElapsedTimeMillis + " ms.");			System.out.println("Median elapsed time per-thread was "					+ elapsedTimes.get(elapsedTimes.size() / 2) + " ms.");			System.out.println("Minimum elapsed time per-thread was "					+ elapsedTimes.get(0) + " ms.");			System.out.println("Maximum elapsed time per-thread was "					+ elapsedTimes.get(elapsedTimes.size() - 1) + " ms.");		}	}	/**	 * 	 * 	 * @throws Exception	 *             ...	 */	public void testCreateConnections() throws Exception {		new CreateThread().run();	}	/**	 * 	 * 	 * @throws Exception	 *             ...	 */	public void testCreateConnectionsUnderLoad() throws Exception {		new CreateThread(new BusyThread()).run();	}	void contentiousWork(Connection threadConn, Statement threadStmt,			int threadNumber) {		Date now = new Date();		try {			for (int i = 0; i < 1000; i++) {				ResultSet threadRs = threadStmt.executeQuery("SELECT 1, 2");				while (threadRs.next()) {					threadRs.getString(1);					threadRs.getString(2);				}				threadRs.close();				PreparedStatement pStmt = threadConn						.prepareStatement("SELECT ?");				pStmt.setTimestamp(1, new Timestamp(now.getTime()));				threadRs = pStmt.executeQuery();				while (threadRs.next()) {					threadRs.getTimestamp(1);				}				threadRs.close();				pStmt.close();			}		} catch (Exception ex) {			throw new RuntimeException(ex.toString());		}	}	synchronized void reportDone() {		this.numThreadsStarted--;		notify();	}	public class BusyThread extends Thread {		boolean stop = false;		public void run() {			while (!this.stop) {			}		}	}	class ContentionThread extends Thread {		Connection threadConn;		Statement threadStmt;		int threadNumber;		long elapsedTimeMillis;		public ContentionThread(int num) throws SQLException {			this.threadNumber = num;			this.threadConn = getConnectionWithProps(new Properties());			this.threadStmt = this.threadConn.createStatement();			System.out.println(this.threadConn);		}		public void run() {			long start = System.currentTimeMillis();			try {				contentiousWork(this.threadConn, this.threadStmt,						this.threadNumber);				this.elapsedTimeMillis = System.currentTimeMillis() - start;				System.out						.println("Thread " + this.threadNumber + " finished.");			} finally {				if (this.elapsedTimeMillis == 0) {					this.elapsedTimeMillis = System.currentTimeMillis() - start;				}				reportDone();				try {					this.threadStmt.close();					this.threadConn.close();				} catch (SQLException ex) {					// ignore				}			}		}	}	class CreateThread extends Thread {		BusyThread busyThread;		int numConnections = 15;		public CreateThread() {		}		public CreateThread(BusyThread toStop) {			this.busyThread = toStop;		}		public CreateThread(int numConns) {			this.numConnections = numConns;		}		public void run() {			try {				Connection[] connList = new Connection[this.numConnections];				long maxConnTime = Long.MIN_VALUE;				long minConnTime = Long.MAX_VALUE;				double averageTime = 0;				Properties nullProps = new Properties();				for (int i = 0; i < this.numConnections; i++) {					long startTime = System.currentTimeMillis();					connList[i] = getConnectionWithProps(nullProps);					long endTime = System.currentTimeMillis();					long ellapsedTime = endTime - startTime;					if (ellapsedTime < minConnTime) {						minConnTime = ellapsedTime;					}					if (ellapsedTime > maxConnTime) {						maxConnTime = ellapsedTime;					}					averageTime += ((double) ellapsedTime / this.numConnections);				}				if (this.busyThread != null) {					this.busyThread.stop = true;				}				for (int i = 0; i < this.numConnections; i++) {					connList[i].close();				}				System.out.println(minConnTime + "/" + maxConnTime + "/"						+ averageTime);			} catch (Exception ex) {				throw new RuntimeException(ex);			}		}	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区综合 | 日韩精品每日更新| 亚洲制服丝袜av| 亚洲美女淫视频| 亚洲一区在线观看免费观看电影高清 | 免费成人在线影院| 久久9热精品视频| 国产成人综合在线播放| 成人激情文学综合网| 91女厕偷拍女厕偷拍高清| 在线免费观看日韩欧美| 欧美日韩电影在线播放| 日韩一本二本av| 国产偷国产偷精品高清尤物| 国产精品久99| 亚洲综合久久久久| 美脚の诱脚舐め脚责91| 国产精品白丝jk黑袜喷水| 成人在线视频首页| 一本在线高清不卡dvd| 欧美日韩一区二区三区高清| 日韩一区二区在线看| 久久在线免费观看| 国产精品九色蝌蚪自拍| 亚洲成人三级小说| 精品亚洲欧美一区| 97精品久久久午夜一区二区三区| 欧美亚一区二区| 日韩精品中文字幕在线不卡尤物 | 欧美一区二区精美| 国产欧美一区二区精品婷婷| 综合婷婷亚洲小说| 午夜av一区二区三区| 激情综合色播五月| 99国产精品久| 日韩精品一区二区三区在线| 亚洲国产精品ⅴa在线观看| 亚洲一区二区中文在线| 国产一区二区福利视频| 91丨porny丨户外露出| 欧美一区二区三区四区在线观看| 国产欧美日韩视频在线观看| 亚洲成人一区二区在线观看| 国产一区二区免费在线| 欧洲精品中文字幕| 久久久久久免费毛片精品| 亚洲自拍偷拍网站| 国产成人在线看| 欧美日韩国产高清一区| 国产精品麻豆视频| 青青青爽久久午夜综合久久午夜| 国产成人在线网站| 91麻豆精品国产自产在线观看一区| 国产欧美一区二区精品秋霞影院 | 午夜久久久久久久久久一区二区| 九九热在线视频观看这里只有精品| av午夜精品一区二区三区| 在线播放国产精品二区一二区四区 | 丰满放荡岳乱妇91ww| 欧美日本一区二区| 中文字幕一区二区三区四区 | 亚洲图片欧美激情| 久88久久88久久久| 欧美性色黄大片手机版| 国产精品久久久久久久久免费相片 | 中文字幕欧美一区| 久久精品国产精品亚洲红杏| 色妹子一区二区| 国产精品丝袜黑色高跟| 久久99热99| 欧美日韩电影在线播放| 亚洲日本电影在线| 国产成人精品影视| 日韩久久免费av| 三级欧美韩日大片在线看| 91色porny| 中文字幕在线观看不卡| 国产精选一区二区三区| 91精品国产福利在线观看| 亚洲精选免费视频| 成人性生交大合| 久久综合999| 美女精品自拍一二三四| 欧美日韩精品欧美日韩精品| 亚洲美女免费在线| av一区二区三区| 日本一区二区视频在线| 黄页视频在线91| 日韩欧美一级在线播放| 性做久久久久久免费观看| 在线一区二区视频| 亚洲猫色日本管| 91一区二区三区在线观看| 中文字幕高清一区| 粉嫩aⅴ一区二区三区四区| 久久久久国产精品免费免费搜索| 激情图片小说一区| 久久午夜电影网| 国产精品12区| 国产欧美综合色| 成人免费毛片片v| 国产精品欧美一区二区三区| 顶级嫩模精品视频在线看| 国产三级三级三级精品8ⅰ区| 国产精品系列在线观看| 久久精品视频免费| 风间由美一区二区三区在线观看| 国产精品网友自拍| www.欧美.com| 亚洲欧美一区二区视频| 91亚洲永久精品| 亚洲在线视频免费观看| 欧美日韩免费高清一区色橹橹 | 日韩电影在线观看网站| 7777精品伊人久久久大香线蕉经典版下载| 亚洲国产精品天堂| 欧美日韩电影一区| 麻豆91精品视频| 久久久亚洲精品石原莉奈| 国产成人小视频| 国产精品国产三级国产aⅴ无密码| 成人精品一区二区三区四区| 国产精品久久久久aaaa| 91麻豆精品在线观看| 伊人性伊人情综合网| 欧美图片一区二区三区| 日韩不卡在线观看日韩不卡视频| 日韩精品最新网址| 国产69精品久久99不卡| 亚洲欧洲制服丝袜| 欧美老肥妇做.爰bbww视频| 日韩精品一级中文字幕精品视频免费观看 | 一区二区三区高清在线| 欧美日韩另类一区| 韩国一区二区在线观看| 中文字幕免费不卡| 91搞黄在线观看| 久久电影国产免费久久电影| 日本一区二区三区国色天香| 日本大香伊一区二区三区| 日韩国产成人精品| 国产午夜亚洲精品不卡| 色综合久久久网| 麻豆精品视频在线观看视频| 欧美国产国产综合| 欧美日韩免费视频| 国产精品亚洲第一| 亚洲一区二区视频| 精品久久久久久无| eeuss鲁一区二区三区| 亚洲aⅴ怡春院| 久久精品日韩一区二区三区| 91视频国产观看| 久久爱www久久做| 亚洲女厕所小便bbb| 日韩欧美www| 91日韩精品一区| 久久国产剧场电影| 一区二区三区日韩精品视频| 成年人网站91| 美女国产一区二区三区| 中文字幕字幕中文在线中不卡视频| 欧美精选在线播放| jvid福利写真一区二区三区| 性欧美疯狂xxxxbbbb| 欧美激情在线一区二区| 欧美久久久久免费| kk眼镜猥琐国模调教系列一区二区| 日本不卡高清视频| 中文字幕一区二区三区四区不卡| 日韩一级完整毛片| 91麻豆国产香蕉久久精品| 精品一区二区成人精品| 亚洲成人午夜电影| 亚洲视频在线观看一区| 精品久久国产老人久久综合| 在线观看三级视频欧美| 国产成人鲁色资源国产91色综| 午夜精品视频在线观看| 国产精品高潮呻吟| www成人在线观看| 欧美另类久久久品| 色老头久久综合| 成人美女视频在线观看18| 美脚の诱脚舐め脚责91| 亚洲综合视频在线| 国产精品高潮呻吟久久| 久久久久青草大香线综合精品| 欧美高清www午色夜在线视频| 91毛片在线观看| 大胆欧美人体老妇| 精彩视频一区二区三区| 五月综合激情婷婷六月色窝| 亚洲欧美日韩精品久久久久| 久久精品亚洲精品国产欧美kt∨| 91精品国产全国免费观看| 欧美羞羞免费网站| 色婷婷av一区二区三区大白胸| 大陆成人av片| 粉嫩久久99精品久久久久久夜|