Package org.gearman.tests.load
Class InstrumentedJobSubmitter
- java.lang.Object
-
- org.gearman.tests.load.InstrumentedJobSubmitter
-
-
Constructor Summary
Constructors Constructor Description InstrumentedJobSubmitter(long numberOfIterations, String function, List<String> hosts, DataGenerator generator)
InstrumentedJobSubmitter(String function, List<String> hosts, DataGenerator generator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getAverageExecutionTime()
long
getAverageTime()
long
getCompleted()
Retrieves the number of jobs that have been executed by a job server.String
getStatsString()
long
getSubmitted()
Retrieves the number of jobs that have been successfully submitted to a job server.long
getSucceeded()
Retrieves the number of jobs that have been successfully executed by a job server.long
getTotalExecutionTime()
long
getTotalTime()
boolean
isRunning()
static void
main(String... args)
void
run()
void
stop()
-
-
-
Constructor Detail
-
InstrumentedJobSubmitter
public InstrumentedJobSubmitter(long numberOfIterations, String function, List<String> hosts, DataGenerator generator)
-
InstrumentedJobSubmitter
public InstrumentedJobSubmitter(String function, List<String> hosts, DataGenerator generator)
-
-
Method Detail
-
main
public static void main(String... args)
-
stop
public void stop()
-
isRunning
public boolean isRunning()
-
getSubmitted
public long getSubmitted()
Retrieves the number of jobs that have been successfully submitted to a job server. A job is considered successfully submitted if the job was created and submitted to the job server without encountering an exception.- Returns:
- The number of jobs that have been successfully submitted to a job server.
-
getCompleted
public long getCompleted()
Retrieves the number of jobs that have been executed by a job server. A job is considered completed if the client has received a result for the job (note, the result need not be a successful one).- Returns:
- The number of jobs that have completed execution.
-
getSucceeded
public long getSucceeded()
Retrieves the number of jobs that have been successfully executed by a job server. A job is considered successful if the correspondingGearmanJobResult.jobSucceeded()
returns true.- Returns:
- The number of jobs that have been successfully executed.
-
getTotalTime
public long getTotalTime()
- Returns:
- The total amount of the time the submitter has spent creating and submitting jobs.
-
getAverageTime
public long getAverageTime()
- Returns:
- The average time it takes for the submitter to create a job and submit it to a job server.
-
getTotalExecutionTime
public long getTotalExecutionTime()
- Returns:
- The total amount of the time the submitter has spent creating and submitting jobs and retrieving job results.
-
getAverageExecutionTime
public long getAverageExecutionTime()
- Returns:
- The average amount of time it takes the submitter to create and submit jobs and retrieve job results.
-
getStatsString
public String getStatsString()
-
-