net.sf.fikin.sql.core
Class ExecutionTiming

java.lang.Object
  extended by net.sf.fikin.sql.SQLPipeElement
      extended by net.sf.fikin.sql.core.ExecutionTiming

public class ExecutionTiming
extends SQLPipeElement

Meassure the time in ms to execute given sql command

Typically this element must be positioned right before ExecuteSql element in order to represent most objective timing.

created on Dec 15, 2006

Since:
Version:
$Revision: 1.4 $
Author:
fiykov

Constructor Summary
ExecutionTiming()
           
 
Method Summary
 void execute(java.lang.String cmd)
          take a measurement how long it will take to next pipe element to execute the sql command
 long getDurationMs()
          return meassured time in ms it is not valid in case there was SQLException throws it is not valid in case it is read from pipe elements, placed "next" to this one i.e.
 
Methods inherited from class net.sf.fikin.sql.SQLPipeElement
getBaseClassName, getId, getNext, getPipe, setNext, setPipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionTiming

public ExecutionTiming()
Method Detail

execute

public void execute(java.lang.String cmd)
             throws java.sql.SQLException
take a measurement how long it will take to next pipe element to execute the sql command

Specified by:
execute in class SQLPipeElement
Parameters:
cmd - to execute
Throws:
java.sql.SQLException - in case of error

getDurationMs

public long getDurationMs()
return meassured time in ms it is not valid in case there was SQLException throws it is not valid in case it is read from pipe elements, placed "next" to this one i.e. use it only from elements, created before in the pipe this one

Returns:
duration in ms


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.