org.hawk.data.perf
Class HawkPerfDataCollector

java.lang.Object
  extended by org.hawk.data.perf.HawkPerfDataCollector

public class HawkPerfDataCollector
extends java.lang.Object

This collects the perf data from all the modules execution.


Field Summary
static java.util.List<HawkPerfData> all
           
static java.util.Map<java.lang.String,java.util.List<HawkPerfData>> moduleMap
           
static java.util.Map<java.lang.String,java.util.List<HawkPerfData>> moduleTaskMap
           
 
Constructor Summary
HawkPerfDataCollector()
           
 
Method Summary
static boolean dump()
           
static boolean dump(boolean shouldDump)
           
static boolean end(IModule module)
          This ends perf data collection Note: Here the module's default task "NONE" is considered as subtask.
static boolean end(IModule module, java.lang.String moduleSubTask)
          This ends perf data collection
static boolean endWithFailure(IModule module)
          This ends perf data collection for failure case
static boolean endWithFailure(IModule module, java.lang.String moduleSubTask)
          This ends perf data collection for failure case
static long getHawkEndTime()
           
static long getHawkStartTime()
           
static java.lang.String getPerfDataFilePath()
           
static java.lang.String getPerfDataModuleFilePath(java.lang.String module)
           
static boolean isEnded()
          This indicates whether the current module is ended or not.
static boolean isStarted()
          This indicates whether the current module is started or not.
static void main(java.lang.String[] args)
           
static boolean perfDataExists()
           
static boolean perfDataModuleFilePathExists(java.lang.String module)
           
static boolean processPerfData()
           
static java.util.List<HawkPerfData> readPerfData()
           
static boolean start(IModule module)
          This starts perf data collection Note: Here the module's default task "NONE" is considered as subtask.
static boolean start(IModule module, java.lang.String moduleSubTask)
          This starts perf data collection
static boolean writePerfData(java.util.List<HawkPerfData> all, java.lang.String logFilePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moduleMap

public static java.util.Map<java.lang.String,java.util.List<HawkPerfData>> moduleMap

moduleTaskMap

public static java.util.Map<java.lang.String,java.util.List<HawkPerfData>> moduleTaskMap

all

public static java.util.List<HawkPerfData> all
Constructor Detail

HawkPerfDataCollector

public HawkPerfDataCollector()
Method Detail

isStarted

public static boolean isStarted()
This indicates whether the current module is started or not.

Returns:

isEnded

public static boolean isEnded()
This indicates whether the current module is ended or not.

Returns:

start

public static boolean start(IModule module,
                            java.lang.String moduleSubTask)
This starts perf data collection

Parameters:
module -
moduleSubTask -
Returns:
returns true if it is successfully stared otherwise false.

start

public static boolean start(IModule module)
This starts perf data collection Note: Here the module's default task "NONE" is considered as subtask.

Parameters:
module -
Returns:
returns true if it is successfully stared otherwise false.

end

public static boolean end(IModule module,
                          java.lang.String moduleSubTask)
This ends perf data collection

Parameters:
module -
moduleSubTask -
Returns:
returns true if it is successfully ended otherwise false.

end

public static boolean end(IModule module)
This ends perf data collection Note: Here the module's default task "NONE" is considered as subtask.

Parameters:
module -
Returns:
returns true if it is successfully ended otherwise false.

endWithFailure

public static boolean endWithFailure(IModule module,
                                     java.lang.String moduleSubTask)
This ends perf data collection for failure case

Parameters:
module -
moduleSubTask -
Returns:
returns true if it is successfully ended otherwise false.

endWithFailure

public static boolean endWithFailure(IModule module)
This ends perf data collection for failure case

Parameters:
module -
Returns:
returns true if it is successfully ended otherwise false.

getPerfDataFilePath

public static java.lang.String getPerfDataFilePath()

getPerfDataModuleFilePath

public static java.lang.String getPerfDataModuleFilePath(java.lang.String module)

perfDataModuleFilePathExists

public static boolean perfDataModuleFilePathExists(java.lang.String module)

perfDataExists

public static boolean perfDataExists()

dump

public static boolean dump()

dump

public static boolean dump(boolean shouldDump)

writePerfData

public static boolean writePerfData(java.util.List<HawkPerfData> all,
                                    java.lang.String logFilePath)

readPerfData

public static java.util.List<HawkPerfData> readPerfData()
                                                 throws HawkException
Throws:
HawkException

main

public static void main(java.lang.String[] args)

getHawkStartTime

public static long getHawkStartTime()

getHawkEndTime

public static long getHawkEndTime()

processPerfData

public static boolean processPerfData()