Databases Reference
In-Depth Information
public void run () {
// Initialize variables
ThreadInfo.numExecutes = 0;
ThreadInfo.numRows = 0;
ThreadInfo.actualTime = 0.;
Connection conn = ThreadInfo.conn;
int threadNumber = ThreadInfo.threadNumber;
int totalExecutes = 0;
int totalRows = 0;
long start=0;
long end=0;
long cpuStart=0;
long cpuEnd=0;
PreparedStatement stmt = null;
ResultSet rs = null;
// Initialize fetch string
String sqlStr = "SELECT Name, ProductCategory, " +
"Manufacturer, MSRP, OurPrice, " +
"SalePrice, SaleStart, SaleEnd, " +
"SKU, UPC, Quantity, Description, " +
"LongDescription, ThumbnailPicture, " +
"Picture, OtherOffers, RebateInfo, " +
"UserRating FROM RetailTable";
// Start the timer
start = System.currentTimeMillis();
ThreadInfo.ready = true;
while (Wait) {
// Make an OS call.
// This is to avoid a "tight" loop that may prevent
// the timer thread from running.
try {
Thread.sleep(100);
}
catch (InterruptedException e) {
Search WWH ::




Custom Search