public class ScrapeProfiler extends java.lang.Object implements LogMappable
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
convertMap()
Converts the current object into a mapping of key-value pairs that can be logged
|
java.lang.String |
generateHtmlReport()
Returns a full html document string containing the html report of profiling to this point
|
java.util.List<java.lang.String> |
getCurrentStackDescriptions()
Returns a list of the descriptions of each element on the stack, in the order they are on the stack
|
java.util.Set<com.screenscraper.profiling.session.ScrapeProfiler.SessionVariableStats> |
getSessionVariablesCompleteStats()
Returns the stat summary for session variables
|
static ScrapeProfiler |
profileSession(ScrapingSession session,
boolean trackAllThreads)
Instruments the session with a profiler and returns the profiler.
|
void |
removeBreakpointOnSessionVariableChange(java.lang.String variableName)
Sets the profiler to no longer breakpoint when the session variable with the given name is changed
|
void |
setBreakpointOnSessionVariableChange(java.lang.String variableName)
Sets the profiler to breakpoint when the session variable with the given name is changed
|
java.lang.String |
toString() |
@NotNull @RequiredVersion(value=1) public static ScrapeProfiler profileSession(@NotNull ScrapingSession session, boolean trackAllThreads)
session
- The scraping session to profiletrackAllThreads
- True if profiling should apply to all threads of this scrape. Mainly this refers to session variable reads / writes done in other
threads, such as the DataManager. Setting this to true can give false readings for the reads and writes, as counted per element (scripts, scrapeable
files)public void setBreakpointOnSessionVariableChange(@NotNull java.lang.String variableName)
variableName
- The name of the variablepublic void removeBreakpointOnSessionVariableChange(@NotNull java.lang.String variableName)
variableName
- The name of the variable@NotNull public java.util.Map<java.lang.String,java.lang.Object> convertMap()
LogMappable
convertMap
in interface LogMappable
@NotNull public java.util.List<java.lang.String> getCurrentStackDescriptions()
@NotNull public java.util.Set<com.screenscraper.profiling.session.ScrapeProfiler.SessionVariableStats> getSessionVariablesCompleteStats()
@NotNull public java.lang.String generateHtmlReport()
@NotNull public java.lang.String toString()
toString
in class java.lang.Object