org.apache.directory.server.benchmarks
Class BindBenchmark

java.lang.Object
  extended byJobClass
      extended byorg.apache.directory.server.benchmarks.BindBenchmark

public class BindBenchmark
extends JobClass

A simple bind benchmark. Here the same bindDn and password is used to bind to the directory. The connection to the directory is by default shared across iterations of a thread but this can be changed. This is not a real world experiment but a way for us to stress test the server, profile it, optimize it and regression test our results under stress for more reliable feedback.

Version:
$Rev$, $Date$
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
static java.lang.String STAT_TRACKER_AUTHENTICATION_ATTEMPTS
          The name of the stat tracker that will be used to count the number of authentication attempts.
static java.lang.String STAT_TRACKER_AUTHENTICATION_TIME
          The name of the stat tracker that will be used to keep track of the time required to perform each authentication.
static java.lang.String STAT_TRACKER_FAILED_AUTHENTICATIONS
          The name of the stat tracker that will be used to count the number of failed authentications.
static java.lang.String STAT_TRACKER_SUCCESSFUL_AUTHENTICATIONS
          The name of the stat tracker that will be used to count the number of successful authentications.
 
Constructor Summary
BindBenchmark()
           
 
Method Summary
 void destroy()
          Attempts to force this thread to exit by closing the connections to the directory server and setting them to null.
 java.lang.String getJobCategoryName()
           
 java.lang.String getJobDescription()
           
 java.lang.String getJobName()
           
 ParameterList getParameterStubs()
          Returns the set of parameters whose value may be specified by the end user.
 StatTracker[] getStatTrackers()
           
 StatTracker[] getStatTrackerStubs(java.lang.String clientID, java.lang.String threadID, int collectionInterval)
           
 void initializeClient(java.lang.String clientID, ParameterList parameters)
          Performs initialization for this job on each client immediately before each thread is created to actually run the job.
 void initializeThread(java.lang.String clientID, java.lang.String threadID, int collectionInterval, ParameterList parameters)
           
 boolean providesParameterTest()
           
 void runJob()
          Performs the work of actually running the job.
 boolean testJobParameters(ParameterList parameters, java.util.ArrayList outputMessages)
          Provides a means of testing the provided job parameters to determine whether they are valid (e.g., to see if the server is reachable) before scheduling the job for execution.
 void validateJobInfo(int numClients, int threadsPerClient, int threadStartupDelay, java.util.Date startTime, java.util.Date stopTime, int duration, int collectionInterval, ParameterList parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STAT_TRACKER_AUTHENTICATION_ATTEMPTS

public static final java.lang.String STAT_TRACKER_AUTHENTICATION_ATTEMPTS
The name of the stat tracker that will be used to count the number of authentication attempts.

See Also:
Constant Field Values

STAT_TRACKER_AUTHENTICATION_TIME

public static final java.lang.String STAT_TRACKER_AUTHENTICATION_TIME
The name of the stat tracker that will be used to keep track of the time required to perform each authentication.

See Also:
Constant Field Values

STAT_TRACKER_FAILED_AUTHENTICATIONS

public static final java.lang.String STAT_TRACKER_FAILED_AUTHENTICATIONS
The name of the stat tracker that will be used to count the number of failed authentications.

See Also:
Constant Field Values

STAT_TRACKER_SUCCESSFUL_AUTHENTICATIONS

public static final java.lang.String STAT_TRACKER_SUCCESSFUL_AUTHENTICATIONS
The name of the stat tracker that will be used to count the number of successful authentications.

See Also:
Constant Field Values
Constructor Detail

BindBenchmark

public BindBenchmark()
Method Detail

getJobDescription

public java.lang.String getJobDescription()

getJobName

public java.lang.String getJobName()

getJobCategoryName

public java.lang.String getJobCategoryName()

getParameterStubs

public ParameterList getParameterStubs()
Returns the set of parameters whose value may be specified by the end user.

Returns:
The set of configurable parameters for this job class.

getStatTrackerStubs

public StatTracker[] getStatTrackerStubs(java.lang.String clientID,
                                         java.lang.String threadID,
                                         int collectionInterval)

getStatTrackers

public StatTracker[] getStatTrackers()

validateJobInfo

public void validateJobInfo(int numClients,
                            int threadsPerClient,
                            int threadStartupDelay,
                            java.util.Date startTime,
                            java.util.Date stopTime,
                            int duration,
                            int collectionInterval,
                            ParameterList parameters)
                     throws InvalidValueException
Throws:
InvalidValueException

providesParameterTest

public boolean providesParameterTest()

testJobParameters

public boolean testJobParameters(ParameterList parameters,
                                 java.util.ArrayList outputMessages)
Provides a means of testing the provided job parameters to determine whether they are valid (e.g., to see if the server is reachable) before scheduling the job for execution. This method will be executed by the SLAMD server system itself and not by any of the clients.

Parameters:
parameters - The job parameters to be tested.
outputMessages - The lines of output that were generated as part of the testing process. Each line of output should be added to this list as a separate string, and empty strings (but not null values) are allowed to provide separation between different messages. No formatting should be provided for these messages, however, since they may be displayed in either an HTML or plain text interface.
Returns:
true if the test completed successfully, or false if not.

initializeClient

public void initializeClient(java.lang.String clientID,
                             ParameterList parameters)
                      throws UnableToRunException
Performs initialization for this job on each client immediately before each thread is created to actually run the job.

Parameters:
clientID - The ID assigned to the client running this job.
parameters - The set of parameters provided to this job that can be used to customize its behavior.
Throws:
UnableToRunException - If the client initialization could not be completed successfully and the job is unable to run.

initializeThread

public void initializeThread(java.lang.String clientID,
                             java.lang.String threadID,
                             int collectionInterval,
                             ParameterList parameters)
                      throws UnableToRunException
Throws:
UnableToRunException

runJob

public void runJob()
Performs the work of actually running the job. When this method completes, the job will be done.


destroy

public void destroy()
Attempts to force this thread to exit by closing the connections to the directory server and setting them to null.