public class PerfLogger extends Object
Constructor and Description |
---|
PerfLogger() |
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.commons.logging.Log _log,
QueryPlan queryPlan)
Call this function at the end of processing a query (any time after the last call to PerfLogEnd
for a given query) to run any cleanup/final steps that need to be run
|
boolean |
endTimeHasMethod(String method) |
Long |
getDuration(String method) |
Long |
getEndTime(String method) |
static PerfLogger |
getPerfLogger() |
static PerfLogger |
getPerfLogger(boolean resetPerfLogger)
Call this function to get an instance of PerfLogger.
|
Long |
getStartTime(String method) |
void |
PerfLogBegin(String callerName,
String method)
Call this function when you start to measure time spent by a piece of code.
|
long |
PerfLogEnd(String callerName,
String method)
Call this function in correspondence of PerfLogBegin to mark the end of the measurement.
|
boolean |
startTimeHasMethod(String method) |
public static final String ACQUIRE_READ_WRITE_LOCKS
public static final String COMPILE
public static final String PARSE
public static final String ANALYZE
public static final String DO_AUTHORIZATION
public static final String DRIVER_EXECUTE
public static final String INPUT_SUMMARY
public static final String GET_SPLITS
public static final String RUN_TASKS
public static final String SERIALIZE_PLAN
public static final String DESERIALIZE_PLAN
public static final String CLONE_PLAN
public static final String TASK
public static final String RELEASE_LOCKS
public static final String PRUNE_LISTING
public static final String PARTITION_RETRIEVING
public static final String PRE_HOOK
public static final String POST_HOOK
public static final String FAILURE_HOOK
public static final String DRIVER_RUN
public static final String TIME_TO_SUBMIT
public static final String TEZ_SUBMIT_TO_RUNNING
public static final String TEZ_BUILD_DAG
public static final String TEZ_SUBMIT_DAG
public static final String TEZ_RUN_DAG
public static final String TEZ_CREATE_VERTEX
public static final String TEZ_RUN_VERTEX
public static final String TEZ_INITIALIZE_PROCESSOR
public static final String TEZ_RUN_PROCESSOR
public static final String TEZ_INIT_OPERATORS
public static final String LOAD_HASHTABLE
public static final String ORC_GET_SPLITS
public static final String SPARK_SUBMIT_TO_RUNNING
public static final String SPARK_BUILD_PLAN
public static final String SPARK_BUILD_RDD_GRAPH
public static final String SPARK_SUBMIT_JOB
public static final String SPARK_RUN_JOB
public static final String SPARK_CREATE_TRAN
public static final String SPARK_RUN_STAGE
public static final String SPARK_INIT_OPERATORS
public static final String SPARK_GENERATE_TASK_TREE
public static final String SPARK_OPTIMIZE_OPERATOR_TREE
public static final String SPARK_OPTIMIZE_TASK_TREE
public static final String SPARK_FLUSH_HASHTABLE
protected static final ThreadLocal<PerfLogger> perfLogger
public static PerfLogger getPerfLogger()
public static PerfLogger getPerfLogger(boolean resetPerfLogger)
public void PerfLogBegin(String callerName, String method)
_log
- the logging object to be used.method
- method or ID that identifies this perf log element.public long PerfLogEnd(String callerName, String method)
_log
- method
- public void close(org.apache.commons.logging.Log _log, QueryPlan queryPlan)
_log
- public boolean startTimeHasMethod(String method)
public boolean endTimeHasMethod(String method)
Copyright © 2017 The Apache Software Foundation. All rights reserved.