hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject hbase git commit: HBASE-16950 Print raw stats in the end of proc performance tools for parsing results from scripts.
Date Thu, 27 Oct 2016 07:05:07 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 8d9b9dc6b -> a3f149060


HBASE-16950 Print raw stats in the end of proc performance tools for parsing results from
scripts.

Change-Id: I45d77e838689dde7ec596de26ae98bd62e1b727e


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a3f14906
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a3f14906
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a3f14906

Branch: refs/heads/master
Commit: a3f14906017e5bb3ef1cf06b66855b661ef32602
Parents: 8d9b9dc
Author: Apekshit Sharma <appy@apache.org>
Authored: Wed Oct 26 14:59:00 2016 -0700
Committer: Apekshit Sharma <appy@apache.org>
Committed: Thu Oct 27 00:04:24 2016 -0700

----------------------------------------------------------------------
 .../ProcedureWALLoaderPerformanceEvaluation.java  |  8 +++++++-
 .../wal/ProcedureWALPerformanceEvaluation.java    |  8 +++++++-
 ...erProcedureSchedulerPerformanceEvaluation.java | 18 ++++++++++++------
 3 files changed, 26 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a3f14906/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java
b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java
index 347239d..f55d338 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALLoaderPerformanceEvaluation.java
@@ -54,7 +54,7 @@ public class ProcedureWALLoaderPerformanceEvaluation extends AbstractHBaseTool
{
       "Number of WALs to write. If -ve or 0, uses " + WALProcedureStore.ROLL_THRESHOLD_CONF_KEY
+
           " conf to roll the logs. Default: " + DEFAULT_NUM_WALS);
   public static int DEFAULT_STATE_SIZE = 1024;  // 1KB
-  public static Option STATE_SIZE_OPTION = new Option("size", true,
+  public static Option STATE_SIZE_OPTION = new Option("state_size", true,
       "Size of serialized state in bytes to write on update. Default: " + DEFAULT_STATE_SIZE
           + " bytes");
   public static int DEFAULT_UPDATES_PER_PROC = 5;
@@ -212,6 +212,12 @@ public class ProcedureWALLoaderPerformanceEvaluation extends AbstractHBaseTool
{
     System.out.println("******************************************");
     System.out.println("Load time : " + (timeTaken / 1000.0f) + "sec");
     System.out.println("******************************************");
+    System.out.println("Raw format for scripts");
+        System.out.println(String.format("RESULT [%s=%s, %s=%s, %s=%s, %s=%s, %s=%s, "
+                + "total_time_ms=%s]",
+        NUM_PROCS_OPTION.getOpt(), numProcs, STATE_SIZE_OPTION.getOpt(), serializedState.length,
+        UPDATES_PER_PROC_OPTION.getOpt(), updatesPerProc, DELETE_PROCS_FRACTION_OPTION.getOpt(),
+        deleteProcsFraction, NUM_WALS_OPTION.getOpt(), numWals, timeTaken));
   }
 
   public void tearDownProcedureStore() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3f14906/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPerformanceEvaluation.java
b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPerformanceEvaluation.java
index 6f1332c..363574b 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPerformanceEvaluation.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/ProcedureWALPerformanceEvaluation.java
@@ -54,7 +54,7 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool
{
       "Number of WALs to write. If -ve or 0, uses " + WALProcedureStore.ROLL_THRESHOLD_CONF_KEY
+
           " conf to roll the logs. Default: " + DEFAULT_NUM_WALS);
   public static int DEFAULT_STATE_SIZE = 1024;  // 1KB
-  public static Option STATE_SIZE_OPTION = new Option("size", true,
+  public static Option STATE_SIZE_OPTION = new Option("state_size", true,
       "Size of serialized state in bytes to write on update. Default: " + DEFAULT_STATE_SIZE
           + "bytes");
   public static Option SYNC_OPTION = new Option("sync", true,
@@ -173,6 +173,12 @@ public class ProcedureWALPerformanceEvaluation extends AbstractHBaseTool
{
       System.out.println("Sync type      : " + syncType);
       System.out.println("Time taken     : " + (timeTaken / 1000.0f) + "sec");
       System.out.println("******************************************");
+      System.out.println("Raw format for scripts");
+      System.out.println(String.format("RESULT [%s=%s, %s=%s, %s=%s, %s=%s, %s=%s, "
+              + "total_time_ms=%s]",
+          NUM_PROCS_OPTION.getOpt(), numProcs, STATE_SIZE_OPTION.getOpt(), stateSize,
+          SYNC_OPTION.getOpt(), syncType, NUM_THREADS_OPTION.getOpt(), numThreads,
+          NUM_WALS_OPTION.getOpt(), numWals, timeTaken));
       return EXIT_SUCCESS;
     } catch (IOException e) {
       e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/hbase/blob/a3f14906/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java
index ee9b8fc..a63ac03 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java
@@ -67,7 +67,7 @@ public class MasterProcedureSchedulerPerformanceEvaluation extends AbstractHBase
   private int regionsPerTable;
   private int numOps;
   private int numThreads;
-  private String ops_type;
+  private String opsType;
 
   private MasterProcedureScheduler procedureScheduler;
   // List of table/region procedures to schedule.
@@ -148,13 +148,13 @@ public class MasterProcedureSchedulerPerformanceEvaluation extends AbstractHBase
       }
     }
 
-    if (ops_type.equals("table")) {
+    if (opsType.equals("table")) {
       System.out.println("Operations: table only");
       ops = tableOps;
-    } else if (ops_type.equals("region")) {
+    } else if (opsType.equals("region")) {
       System.out.println("Operations: region only");
       ops = regionOps;
-    } else if (ops_type.equals("both")) {
+    } else if (opsType.equals("both")) {
       System.out.println("Operations: both (table + region)");
       ops = (ProcedureFactory[])ArrayUtils.addAll(tableOps, regionOps);
     } else {
@@ -179,7 +179,7 @@ public class MasterProcedureSchedulerPerformanceEvaluation extends AbstractHBase
     numOps = getOptionAsInt(cmd, NUM_OPERATIONS_OPTION.getOpt(),
         DEFAULT_NUM_OPERATIONS);
     numThreads = getOptionAsInt(cmd, NUM_THREADS_OPTION.getOpt(), DEFAULT_NUM_THREADS);
-    ops_type = cmd.getOptionValue(OPS_TYPE_OPTION.getOpt(), DEFAULT_OPS_TYPE);
+    opsType = cmd.getOptionValue(OPS_TYPE_OPTION.getOpt(), DEFAULT_OPS_TYPE);
   }
 
   /*******************
@@ -275,9 +275,15 @@ public class MasterProcedureSchedulerPerformanceEvaluation extends AbstractHBase
     System.out.println();
     System.out.println("Num Tables         : " + numTables);
     System.out.println("Regions per table  : " + regionsPerTable);
-    System.out.println("Operations type    : " + ops_type);
+    System.out.println("Operations type    : " + opsType);
     System.out.println("Threads            : " + numThreads);
     System.out.println("******************************************");
+    System.out.println("Raw format for scripts");
+    System.out.println(String.format("RESULT [%s=%s, %s=%s, %s=%s, %s=%s, %s=%s, "
+            + "num_yield=%s, time_addback_ms=%s, time_poll_ms=%s]",
+        NUM_OPERATIONS_OPTION.getOpt(), numOps, OPS_TYPE_OPTION.getOpt(), opsType,
+        NUM_TABLES_OPTION.getOpt(), numTables, REGIONS_PER_TABLE_OPTION.getOpt(), regionsPerTable,
+        NUM_THREADS_OPTION.getOpt(), numThreads, yield.get(), addBackTime, pollTime));
     return 0;
   }
 


Mime
View raw message