Package edu.umd.cs.findbugs.log
Class Profiler
java.lang.Object
edu.umd.cs.findbugs.log.Profiler
- All Implemented Interfaces:
IProfiler
,XMLWriteable
This class is mutable and not synchronized, so create independent Profiler
instance for each worker thread.
- Author:
- pugh
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static class
static class
static class
static class
static class
static class
static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the previously accumulated data.void
void
endContext
(Object context) getProfile
(Class<?> c) void
report()
Deprecated.void
report
(Comparator<Class<?>> reportComparator, Profiler.Filter filter, PrintStream stream) void
void
startContext
(Object context) void
Deprecated.
-
Constructor Details
-
Profiler
public Profiler()The default constructor forProfiler
.
-
-
Method Details
-
startContext
-
endContext
-
start
- Parameters:
c
- The class of detector, analyzer or others that is NOT shared among worker threads.
-
end
- Parameters:
c
- The class of detector, analyzer or others that is NOT shared among worker threads.
-
report
Deprecated.Default implementation usesProfiler.TotalTimeComparator
and prints out class statistics based on total time spent fot a class -
report
@Deprecated public void report(Comparator<Class<?>> reportComparator, Profiler.Filter filter, PrintStream stream) Deprecated.- Parameters:
reportComparator
- non null comparator instance which will be used to sort the report statistics
-
clear
public void clear()Clears the previously accumulated data. This method is public because it can be accessed explicitely from clients (like Eclipse).There is no need to clear profiler data after each run, because a new profiler instance is used for each analysis run (see
FindBugs2.execute()
). -
getProfile
- Specified by:
getProfile
in interfaceIProfiler
-
writeXML
Deprecated.Description copied from interface:XMLWriteable
Write this object to given XMLOutput.- Specified by:
writeXML
in interfaceXMLWriteable
- Parameters:
xmlOutput
- the XMLOutput for the document- Throws:
IOException
-
ProfileSummary.report(java.util.Comparator<java.lang.Class<?>>, java.util.function.Predicate<edu.umd.cs.findbugs.log.Profiler.Profile>, java.io.PrintStream)
instead.