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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? loadstoreperftest.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? 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.perf;import java.sql.PreparedStatement;import java.sql.SQLException;import java.text.NumberFormat;import testsuite.BaseTestCase;/** * Simple performance testing unit test. *  * @author Mark Matthews */public class LoadStorePerfTest extends BasePerfTest {	/** The table type to use (only for MySQL), 'HEAP' by default */	private String tableType = "HEAP";	private boolean takeMeasurements = false;	private boolean useColumnNames = false;	private boolean largeResults = false;	/**	 * Constructor for LoadStorePerfTest.	 * 	 * @param name	 *            the name of the test to run	 */	public LoadStorePerfTest(String name) {		super(name);		String newTableType = System				.getProperty("com.mysql.jdbc.test.tabletype");		this.largeResults = "TRUE"				.equalsIgnoreCase(System						.getProperty("com.mysql.jdbc.testsuite.loadstoreperf.useBigResults"));		if ((newTableType != null) && (newTableType.length() > 0)) {			this.tableType = newTableType;			System.out.println("Using specified table type of '"					+ this.tableType + "'");		}	}	/**	 * Runs all tests in this test case	 * 	 * @param args	 *            ignored	 * 	 * @throws Exception	 *             if an error occurs	 */	public static void main(String[] args) throws Exception {		new LoadStorePerfTest("test1000Transactions").run();	}	/**	 * @see junit.framework.TestCase#setUp()	 */	public void setUp() throws Exception {		super.setUp();		try {			this.stmt.executeUpdate("DROP TABLE perfLoadStore");		} catch (SQLException sqlEx) {			// ignore		}		String dateTimeType = "DATETIME";		if (BaseTestCase.dbUrl.indexOf("oracle") != -1) {			dateTimeType = "TIMESTAMP";		}		//		// Approximate a run-of-the-mill entity in a business application		//		String query = "CREATE TABLE perfLoadStore (priKey INT NOT NULL, "				+ "fk1 INT NOT NULL, " + "fk2 INT NOT NULL, " + "dtField "				+ dateTimeType + ", " + "charField1 CHAR(32), "				+ "charField2 CHAR(32), " + "charField3 CHAR(32), "				+ "charField4 CHAR(32), " + "intField1 INT, "				+ "intField2 INT, " + "intField3 INT, " + "intField4 INT, "				+ "doubleField1 DECIMAL," + "doubleField2 DOUBLE,"				+ "doubleField3 DOUBLE," + "doubleField4 DOUBLE,"				+ "PRIMARY KEY (priKey))";		if (BaseTestCase.dbUrl.indexOf("mysql") != -1) {			query += (" TYPE=" + this.tableType);		}		this.stmt.executeUpdate(query);		String currentDateValue = "NOW()";		if (BaseTestCase.dbUrl.indexOf("sqlserver") != -1) {			currentDateValue = "GETDATE()";		}		if (BaseTestCase.dbUrl.indexOf("oracle") != -1) {			currentDateValue = "CURRENT_TIMESTAMP";		}		int numLoops = 1;		if (this.largeResults) {			numLoops = 32;		}		System.out.println("Inserting " + numLoops + " rows to retrieve...");		for (int i = 0; i < numLoops; i++) {			this.stmt.executeUpdate("INSERT INTO perfLoadStore (" + "priKey, "					+ "fk1, " + "fk2, " + "dtField, " + "charField1, "					+ "charField2, " + "charField3, " + "charField4, "					+ "intField1, " + "intField2, " + "intField3, "					+ "intField4, " + "doubleField1," + "doubleField2,"					+ "doubleField3," + "doubleField4" + ") VALUES (" + i + "," // priKey					+ "2," // fk1					+ "3," // fk2					+ currentDateValue + "," // dtField					+ "'0123456789ABCDEF0123456789ABCDEF'," // charField1					+ "'0123456789ABCDEF0123456789ABCDEF'," // charField2					+ "'0123456789ABCDEF0123456789ABCDEF'," // charField3					+ "'0123456789ABCDEF0123456789ABCDEF'," // charField4					+ "7," // intField1					+ "8," // intField2					+ "9," // intField3					+ "10," // intField4					+ "1.20," // doubleField1					+ "2.30," // doubleField2					+ "3.40," // doubleField3					+ "4.50" // doubleField4					+ ")");		}	}	/**	 * @see junit.framework.TestCase#tearDown()	 */	public void tearDown() throws Exception {		try {			this.stmt.executeUpdate("DROP TABLE perfLoadStore");		} catch (SQLException sqlEx) {			// ignore		}		super.tearDown();	}	/**	 * Tests and times 1000 load/store type transactions	 * 	 * @throws Exception	 *             if an error occurs	 */	public void test1000Transactions() throws Exception {		this.takeMeasurements = false;		warmUp();		this.takeMeasurements = true;		doIterations(29);		reportResults("\n\nResults for instance # 1: ");	}	/**	 * Runs one iteration of the test.	 * 	 * @see testsuite.perf.BasePerfTest#doOneIteration()	 */	protected void doOneIteration() throws Exception {		PreparedStatement pStmtStore = this.conn				.prepareStatement("UPDATE perfLoadStore SET " + "priKey = ?, "						+ "fk1 = ?, " + "fk2 = ?, " + "dtField = ?, "						+ "charField1 = ?, " + "charField2 = ?, "						+ "charField3 = ?, " + "charField4 = ?, "						+ "intField1 = ?, " + "intField2 = ?, "						+ "intField3 = ?, " + "intField4 = ?, "						+ "doubleField1 = ?," + "doubleField2 = ?,"						+ "doubleField3 = ?," + "doubleField4 = ?"						+ " WHERE priKey=?");		PreparedStatement pStmtCheck = this.conn				.prepareStatement("SELECT COUNT(*) FROM perfLoadStore WHERE priKey=?");		PreparedStatement pStmtLoad = null;		if (this.largeResults) {			pStmtLoad = this.conn.prepareStatement("SELECT " + "priKey, "					+ "fk1, " + "fk2, " + "dtField, " + "charField1, "					+ "charField2, " + "charField3, " + "charField4, "					+ "intField1, " + "intField2, " + "intField3, "					+ "intField4, " + "doubleField1," + "doubleField2, "					+ "doubleField3," + "doubleField4" + " FROM perfLoadStore");		} else {			pStmtLoad = this.conn.prepareStatement("SELECT " + "priKey, "					+ "fk1, " + "fk2, " + "dtField, " + "charField1, "					+ "charField2, " + "charField3, " + "charField4, "					+ "intField1, " + "intField2, " + "intField3, "					+ "intField4, " + "doubleField1," + "doubleField2, "					+ "doubleField3," + "doubleField4"					+ " FROM perfLoadStore WHERE priKey=?");		}		NumberFormat numFormatter = NumberFormat.getInstance();		numFormatter.setMaximumFractionDigits(4);		numFormatter.setMinimumFractionDigits(4);		int transactionCount = 5000;		if (this.largeResults) {			transactionCount = 50;		}		long begin = System.currentTimeMillis();		for (int i = 0; i < transactionCount; i++) {			this.conn.setAutoCommit(false);			pStmtCheck.setInt(1, 1);			this.rs = pStmtCheck.executeQuery();			while (this.rs.next()) {				this.rs.getInt(1);			}			this.rs.close();			if (!this.largeResults) {				pStmtLoad.setInt(1, 1);			}			this.rs = pStmtLoad.executeQuery();			if (this.rs.next()) {				int key = this.rs.getInt(1);				if (!this.useColumnNames) {					pStmtStore.setInt(1, key); // priKey					pStmtStore.setInt(2, this.rs.getInt(2)); // fk1					pStmtStore.setInt(3, this.rs.getInt(3)); // fk2					pStmtStore.setTimestamp(4, this.rs.getTimestamp(4)); // dtField					pStmtStore.setString(5, this.rs.getString(5)); // charField1					pStmtStore.setString(6, this.rs.getString(7)); // charField2					pStmtStore.setString(7, this.rs.getString(7)); // charField3					pStmtStore.setString(8, this.rs.getString(8)); // charField4					pStmtStore.setInt(9, this.rs.getInt(9)); // intField1					pStmtStore.setInt(10, this.rs.getInt(10)); // intField2					pStmtStore.setInt(11, this.rs.getInt(11)); // intField3					pStmtStore.setInt(12, this.rs.getInt(12)); // intField4					pStmtStore.setDouble(13, this.rs.getDouble(13)); // doubleField1					pStmtStore.setDouble(14, this.rs.getDouble(14)); // doubleField2					pStmtStore.setDouble(15, this.rs.getDouble(15)); // doubleField3					pStmtStore.setDouble(16, this.rs.getDouble(16)); // doubleField4					pStmtStore.setInt(17, key);				} else {					/*					 * "UPDATE perfLoadStore SET " + "priKey = ?, " + "fk1 = ?, " +					 * "fk2 = ?, " + "dtField = ?, " + "charField1 = ?, " +					 * "charField2 = ?, " + "charField3 = ?, " + "charField4 = ?, " +					 * "intField1 = ?, " + "intField2 = ?, " + "intField3 = ?, " +					 * "intField4 = ?, " + "doubleField1 = ?," + "doubleField2 =					 * ?," + "doubleField3 = ?," + "doubleField4 = ?" + " WHERE					 * priKey=?");					 */					pStmtStore.setInt(1, key); // priKey					pStmtStore.setInt(2, this.rs.getInt("fk1")); // fk1					pStmtStore.setInt(3, this.rs.getInt("fk2")); // fk2					pStmtStore.setTimestamp(4, this.rs.getTimestamp("dtField")); // dtField					pStmtStore.setString(5, this.rs.getString("charField1")); // charField1					pStmtStore.setString(6, this.rs.getString("charField2")); // charField2					pStmtStore.setString(7, this.rs.getString("charField3")); // charField3					pStmtStore.setString(8, this.rs.getString("charField4")); // charField4					pStmtStore.setInt(9, this.rs.getInt("intField1")); // intField1					pStmtStore.setInt(10, this.rs.getInt("intField2")); // intField2					pStmtStore.setInt(11, this.rs.getInt("intField3")); // intField3					pStmtStore.setInt(12, this.rs.getInt("intField4")); // intField4					pStmtStore.setDouble(13, this.rs.getDouble("doubleField1")); // doubleField1					pStmtStore.setDouble(14, this.rs.getDouble("doubleField2")); // doubleField2					pStmtStore.setDouble(15, this.rs.getDouble("doubleField3")); // doubleField3					pStmtStore.setDouble(16, this.rs.getDouble("doubleField4")); // doubleField4					pStmtStore.setInt(17, key);				}				pStmtStore.executeUpdate();			}			this.rs.close();			this.conn.commit();			this.conn.setAutoCommit(true);		}		pStmtStore.close();		pStmtCheck.close();		pStmtLoad.close();		long end = System.currentTimeMillis();		long timeElapsed = (end - begin);		double timeElapsedSeconds = (double) timeElapsed / 1000;		double tps = transactionCount / timeElapsedSeconds;		if (this.takeMeasurements) {			addResult(tps);			System.out.print("1 [ " + numFormatter.format(getMeanValue())					+ " ] ");		} else {			System.out.println("Warm-up: " + tps + " trans/sec");		}	}	/**	 * Runs the test 10 times to get JIT going, and GC going	 * 	 * @throws Exception	 *             if an error occurs.	 */	protected void warmUp() throws Exception {		try {			System.out.print("Warm-up period (10 iterations)");			for (int i = 0; i < 10; i++) {				doOneIteration();				System.out.print(".");			}			System.out.println();			System.out.println("Warm-up period ends");			System.out.println("\nUnits for this test are transactions/sec.");		} catch (Exception ex) {			ex.printStackTrace();			throw ex;		}	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文av字幕一区| 性做久久久久久免费观看欧美| 欧美韩日一区二区三区| 亚洲一卡二卡三卡四卡无卡久久| 久久精品免费观看| 91丨九色丨国产丨porny| 欧美一区三区四区| 亚洲欧美精品午睡沙发| 国产一区二区三区免费播放| 欧美日韩国产色站一区二区三区| 国产亚洲美州欧州综合国| 亚洲成av人片观看| 91亚洲国产成人精品一区二三| 日韩精品一区二区三区swag| 亚洲综合另类小说| 不卡欧美aaaaa| 国产婷婷色一区二区三区在线| 日日夜夜免费精品| 91国在线观看| 日韩码欧中文字| 成人深夜在线观看| 久久久久久久久久电影| 免费不卡在线观看| 制服丝袜激情欧洲亚洲| 亚洲国产aⅴ天堂久久| av资源站一区| 国产精品久久影院| 成人免费观看男女羞羞视频| 久久亚洲一区二区三区明星换脸 | 男女男精品视频网| 在线观看欧美黄色| 亚洲欧美日韩国产综合| 91亚洲精华国产精华精华液| 中文字幕一区二区三区蜜月| 国产精品亚洲一区二区三区妖精| 精品福利视频一区二区三区| 蜜桃久久av一区| 精品蜜桃在线看| 激情久久五月天| 26uuu精品一区二区| 国产精品影音先锋| 国产精品日日摸夜夜摸av| 国产白丝精品91爽爽久久| 国产欧美日本一区二区三区| 国产成人av影院| 国产精品久久久久久久久久免费看 | 亚洲国产激情av| 99久久精品国产网站| 综合分类小说区另类春色亚洲小说欧美| 成人三级伦理片| 亚洲色欲色欲www| 欧美亚洲动漫制服丝袜| 视频一区二区三区入口| 欧美va在线播放| 成人午夜免费视频| 一二三四区精品视频| 日韩一级片网站| 国产精品夜夜嗨| 成人免费一区二区三区在线观看| 色视频一区二区| 免费久久99精品国产| 国产视频不卡一区| 在线一区二区三区| 九色porny丨国产精品| 国产精品乱人伦中文| 精品视频在线视频| 激情综合色综合久久综合| 国产精品不卡在线| 在线不卡中文字幕播放| 粉嫩绯色av一区二区在线观看| 亚洲综合小说图片| 欧美mv日韩mv亚洲| 91天堂素人约啪| 韩国女主播成人在线| 尤物av一区二区| 精品国精品自拍自在线| 色综合久久综合网欧美综合网| 日韩专区一卡二卡| 一区二区中文字幕在线| 欧美一区二区三区人| 波多野结衣91| 狠狠色综合日日| 亚洲电影第三页| 中文字幕一区二区视频| 欧美mv日韩mv国产网站| 欧美专区日韩专区| 国产成人精品免费一区二区| 五月综合激情婷婷六月色窝| 国产精品色在线观看| 欧美成人一区二区三区在线观看| 91视频91自| 国产精品一品视频| 热久久免费视频| 亚洲一区免费观看| 国产精品久久久久久久久晋中| 精品久久人人做人人爰| 欧美日韩免费不卡视频一区二区三区| 高清beeg欧美| 国产精品白丝jk黑袜喷水| 青青草原综合久久大伊人精品优势| 亚洲一区二区免费视频| 亚洲三级免费电影| 国产精品麻豆一区二区| 日本一区二区综合亚洲| 337p日本欧洲亚洲大胆色噜噜| 在线电影一区二区三区| 欧美性欧美巨大黑白大战| 色综合欧美在线| av电影天堂一区二区在线观看| 国产91在线|亚洲| 国产裸体歌舞团一区二区| 麻豆精品一区二区av白丝在线| 三级不卡在线观看| 免费观看久久久4p| 日本va欧美va精品发布| 日韩av中文字幕一区二区三区| 亚洲国产精品精华液网站| 亚洲一二三四在线观看| 一级中文字幕一区二区| 一区二区三区四区高清精品免费观看| 亚洲天堂久久久久久久| 亚洲激情综合网| 亚洲一区欧美一区| 日韩中文字幕区一区有砖一区| 视频一区二区三区中文字幕| 另类欧美日韩国产在线| 国模娜娜一区二区三区| 国产成人精品一区二区三区四区 | 蜜桃av一区二区| 免费av网站大全久久| 久久se精品一区精品二区| 激情五月播播久久久精品| 国产精品69毛片高清亚洲| 成人激情校园春色| 一本一道久久a久久精品| 欧美性受极品xxxx喷水| 日韩欧美资源站| 久久精品亚洲精品国产欧美 | 精品国产一区二区国模嫣然| 日韩久久精品一区| 中文幕一区二区三区久久蜜桃| 亚洲精品乱码久久久久久| 三级亚洲高清视频| 激情综合色综合久久综合| 成人激情视频网站| 欧美色图天堂网| 精品日本一线二线三线不卡| 亚洲国产激情av| 日韩精品一二三四| 国产99一区视频免费| 欧美性猛交xxxx乱大交退制版| 欧美成人video| 亚洲精品乱码久久久久久| 麻豆精品久久精品色综合| av中文字幕一区| 日韩欧美三级在线| 亚洲人吸女人奶水| 捆绑变态av一区二区三区| 大美女一区二区三区| 欧美精品在线观看一区二区| 久久精品水蜜桃av综合天堂| 亚洲一区二区三区中文字幕在线| 久久99久久99| 欧美性videosxxxxx| 久久久久久久久99精品| 日韩av一区二区三区四区| 成人精品视频一区二区三区尤物| 欧美日韩精品一区二区天天拍小说| 26uuu亚洲综合色| 亚洲3atv精品一区二区三区| 成人短视频下载| 26uuu亚洲综合色欧美| 日韩精品国产精品| 色欧美日韩亚洲| 久久久久国产免费免费| 欧美a一区二区| 欧美日韩精品一区二区天天拍小说 | 2024国产精品| 天天影视色香欲综合网老头| 91亚洲国产成人精品一区二区三| 欧美精品一区二区三区在线播放| 亚洲一卡二卡三卡四卡| 色综合色狠狠综合色| 中文字幕永久在线不卡| 国产老肥熟一区二区三区| 日韩欧美一二三| 蜜臀av一区二区| 91麻豆精品91久久久久久清纯| 一区二区三区四区不卡在线 | 亚洲美女视频一区| 不卡av在线免费观看| 国产色产综合产在线视频 | 亚洲成av人片一区二区梦乃| 99久久99久久综合| 中文字幕亚洲成人| 成人av网站免费| 综合av第一页| 一本久道中文字幕精品亚洲嫩| 国产精品国产a级| 国产suv一区二区三区88区|