Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gh-100 Time clean up and count it for hbase as update.

* Time the cleanUp of a DBWrapper
* For HBase this clean up should also be counted as an update.
  • Loading branch information...
commit 89df1ac1e6ed5d90b56cd5cc33721ede3f68795a 1 parent 9b38c15
@elliottneilclark elliottneilclark authored Michi Mutsuzaki committed
View
3  core/src/main/java/com/yahoo/ycsb/DBWrapper.java
@@ -69,7 +69,10 @@ public void init() throws DBException
*/
public void cleanup() throws DBException
{
+ long st=System.nanoTime();
_db.cleanup();
+ long en=System.nanoTime();
+ _measurements.measure("CLEANUP", (int)((en-st)/1000));
}
/**
View
7 hbase/src/main/java/com/yahoo/ycsb/db/HBaseClient.java
@@ -30,6 +30,7 @@
//import java.util.Set;
//import java.util.Vector;
+import com.yahoo.ycsb.measurements.Measurements;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.client.HTable;
@@ -96,10 +97,16 @@ public void init() throws DBException
*/
public void cleanup() throws DBException
{
+ // Get the measurements instance as this is the only client that should
+ // count clean up time like an update since autoflush is off.
+ Measurements _measurements = Measurements.getMeasurements();
try {
+ long st=System.nanoTime();
if (_hTable != null) {
_hTable.flushCommits();
}
+ long en=System.nanoTime();
+ _measurements.measure("UPDATE", (int)((en-st)/1000));
} catch (IOException e) {
throw new DBException(e);
}
Please sign in to comment.
Something went wrong with that request. Please try again.