Client.java revision d81978a0815d5b8a75633c35e3e1f8708d36f017
// CDDL HEADER START
//
// The contents of this file are subject to the terms of the
// Common Development and Distribution License, Version 1.0 only
// (the "License"). You may not use this file except in compliance
// with the License.
//
// You can obtain a copy of the license at
// See the License for the specific language governing permissions
// and limitations under the License.
//
// When distributing Covered Code, include this CDDL HEADER in each
// file and include the License file at
// trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
// add the following below this CDDL HEADER, with the fields enclosed
// information:
// Portions Copyright [yyyy] [name of copyright owner]
//
// CDDL HEADER END
//
//
// Copyright 2008 Sun Microsystems, Inc.
public class Client {
static int NB_MAX_OPS=100;
static int nb_ops_started=0;
static int nb_ops_done=0;
static int total_nb_ops=0;
static int nb_threads=3;
static int portnumber;
static long duration=0;
static long maxDuration=0;
/*****************************************************************/
public Client()
{
try {
// reinitialize startup
if ( maxDuration != 0 ) {
}
for (int i=0; i < nb_threads; i++ ) {
}
int seconds=0;
while (true) {
// (time = "+(new_t1-t1) + "ms)");
nb_ops_done=0;
synchronized (lock) {
}
if ( (seconds++) >= 9 ) {
seconds=0;
}
}
}
}
catch( Exception e ) {
e.printStackTrace();
}
}
/*****************************************************************/
if ( d > 10000 ) {
} else if ( d > 300 ) {
}
return time;
}
/*****************************************************************/
{
+ "[-D <bindDN> ] [-w <bindPW> ] [-t <nb_threads>] "
+ "[-M <nb_max_ops>] [-d duration (seconds)]";
// Check for these options. -H means to print out a usage message.
// Get the arguments specified for each option.
}
}
}
// option -DM to use default QA settings for Directory manager
bindDN="cn=Directory Manager";
bindPW="secret12";
}
// Check to see if the hostname (which is mandatory)
// is not specified or if the user simply wants to
// see the usage message (-H).
}
// If a port number was specified, convert the port value
// to an integer.
try {
}
}
else {
portnumber=1389;
}
public void run() {
if ( duration != 0 )
}
});
}
/*****************************************************************/
public static void inc_ops_started() {
}
/*****************************************************************/
public static void inc_ops_done() {
nb_ops_done++;
}
/*****************************************************************/
public static void check_ops_started() {
if ( nb_ops_started>=NB_MAX_OPS ) {
//println("DEBUG", "Ops=" + nb_ops);
try {
synchronized (lock) {
}
} catch ( InterruptedException e ) {
e.printStackTrace();
}
}
}
/*****************************************************************/
public static void wait_after_error() {
try {
synchronized (lock) {
}
} catch ( InterruptedException e ) {
e.printStackTrace();
}
}
/*****************************************************************/
try {
}
catch ( InterruptedException e )
{
}
}
/*****************************************************************/
// Initialize the today's date string
}
/*****************************************************************/
}
}