com.sun.faban.harness.tools
Class Mysqlstats
java.lang.Object
com.sun.faban.harness.tools.Mysqlstats
- All Implemented Interfaces:
- Tool
Deprecated.
@Deprecated
public class Mysqlstats
- extends Object
- implements Tool
MysqlStats is a class for mysql stats collection.
It simply collects "show global status" at the start and end of a
run and diffs them.
The tool needs to be specified as follows:
mysqlstats
where MYSQL_HOME is the home directory of mysql,
mysql_user is the username to connect to mysql,
mysql_password is the password for username to connect to mysql.
E.g: mysqlstats /opt/coolstack/mysql_32bit web20 web20
- Author:
- Shanti Subramanyam
- See Also:
GenericTool
Field Summary |
protected Timer |
timer
Deprecated. The timer to be used by this tool. |
Constructor Summary |
Mysqlstats()
Deprecated. Constructs the Mysqlstats. |
Method Summary |
void |
configure(String tool,
List<String> argList,
String path,
String outDir,
String host,
String masterhost,
CmdAgentImpl cmdAgent,
CountDownLatch latch)
Deprecated. Configures Mysqlstats. |
protected void |
finish()
Deprecated. Finishes up mysqlstats. |
protected String |
getLogFile()
Deprecated. Obtains the temporary log file name. |
protected String |
getOutputFile(String outDir,
String host)
Deprecated. Obtains the final output file name. |
protected void |
getReport(String log1,
String log2,
String outFile)
Deprecated. Get final report by diffing the two logfiles. |
void |
kill()
Deprecated. This method is required by the Tool API. |
protected void |
start()
Deprecated. Starts the mysqlstat tool. |
boolean |
start(int delay)
Deprecated. This method is responsible for starting up the tool utility. |
boolean |
start(int delay,
int duration)
Deprecated. This method is responsible for starting up the tool and stopping it
after the duration specified. |
void |
stop()
Deprecated. This method is responsible for stopping the tool. |
protected void |
stop(boolean warn)
Deprecated. This method is responsible for stopping the tool utility. |
protected void |
xferLog()
Deprecated. Transfers the log files to the output file in the results directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timer
protected Timer timer
- Deprecated.
- The timer to be used by this tool.
Mysqlstats
public Mysqlstats()
- Deprecated.
- Constructs the Mysqlstats.
configure
public void configure(String tool,
List<String> argList,
String path,
String outDir,
String host,
String masterhost,
CmdAgentImpl cmdAgent,
CountDownLatch latch)
- Deprecated.
- Configures Mysqlstats.
- Specified by:
configure
in interface Tool
- Parameters:
tool
- name of the tool (Executable)argList
- list containing arguments to toolpath
- The path to run mysqlstatsoutDir
- The output directoryhost
- name of machine the tool is running onmasterhost
- name of master machinecmdAgent
- agent The command agent used for executing toolslatch
- The latch the tool uses to identify it's completion.
getLogFile
protected String getLogFile()
- Deprecated.
- Obtains the temporary log file name.
- Returns:
- The log file name
getOutputFile
protected String getOutputFile(String outDir,
String host)
- Deprecated.
- Obtains the final output file name.
- Parameters:
outDir
- The output or run directoryhost
- The host name running the tool
- Returns:
- The output file name
kill
public void kill()
- Deprecated.
- This method is required by the Tool API.
It is called to abort the currently running tool if any.
- Specified by:
kill
in interface Tool
start
public boolean start(int delay,
int duration)
- Deprecated.
- This method is responsible for starting up the tool and stopping it
after the duration specified. It uses a thread to sleep for the
delay + duration and then calls the stop().
- Specified by:
start
in interface Tool
- Parameters:
delay
- int delay (sec) after which start should be calledduration
- int duration for which the tool needs to be run
- Returns:
- true if mysqlstats scheduled successfully
start
public boolean start(int delay)
- Deprecated.
- This method is responsible for starting up the tool utility.
- Specified by:
start
in interface Tool
- Parameters:
delay
- int delay (sec) after which start should be called
- Returns:
- true if mysqlstats scheduled successfully
start
protected void start()
- Deprecated.
- Starts the mysqlstat tool.
stop
public void stop()
- Deprecated.
- This method is responsible for stopping the tool.
- Specified by:
stop
in interface Tool
stop
protected void stop(boolean warn)
- Deprecated.
- This method is responsible for stopping the tool utility.
- Parameters:
warn
- Whether to warn if tool is not running.
getReport
protected void getReport(String log1,
String log2,
String outFile)
- Deprecated.
- Get final report by diffing the two logfiles.
- Parameters:
log1
- The first logfilelog2
- The second logfileoutFile
- The output file
xferLog
protected void xferLog()
- Deprecated.
- Transfers the log files to the output file in the results directory.
finish
protected void finish()
- Deprecated.
- Finishes up mysqlstats.