HBASE-16950 Print raw stats in the end of proc performance tools for parsing results from scripts.
Change-Id: I45d77e838689dde7ec596de26ae98bd62e1b727e
This commit is contained in:
parent
8d9b9dc6b7
commit
a3f1490601
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue