Package edu.umd.cs.findbugs.log
Class ProfileSummary
- java.lang.Object
-
- edu.umd.cs.findbugs.log.ProfileSummary
-
- All Implemented Interfaces:
IProfiler
,XMLWriteable
public class ProfileSummary extends java.lang.Object implements IProfiler, XMLWriteable
A class that summarize profile recorded by multiple
Profiler
instances. SpotBugs uses this class to summarize profiles from all worker threads.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description ProfileSummary(Profiler... profilers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Profiler.Profile
getProfile(java.lang.Class<?> clazz)
void
report(java.util.Comparator<java.lang.Class<?>> reportComparator, java.util.function.Predicate<Profiler.Profile> filter, java.io.PrintStream stream)
Report summarized profile to givenPrintStream
.void
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
profilers
private final Profiler[] profilers
-
-
Method Detail
-
report
public void report(java.util.Comparator<java.lang.Class<?>> reportComparator, java.util.function.Predicate<Profiler.Profile> filter, java.io.PrintStream stream)
Report summarized profile to given
PrintStream
.This method does not check the state of given
PrintStream
, and it is caller's duty to check it byPrintStream.checkError()
.- Parameters:
reportComparator
-filter
-stream
-
-
writeXML
public void writeXML(@NonNull XMLOutput xmlOutput) throws java.io.IOException
Description copied from interface:XMLWriteable
Write this object to given XMLOutput.- Specified by:
writeXML
in interfaceXMLWriteable
- Parameters:
xmlOutput
- the XMLOutput for the document- Throws:
java.io.IOException
-
getProfile
public Profiler.Profile getProfile(java.lang.Class<?> clazz)
- Specified by:
getProfile
in interfaceIProfiler
-
-