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
Profilerinstances. 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.ProfilegetProfile(java.lang.Class<?> clazz)voidreport(java.util.Comparator<java.lang.Class<?>> reportComparator, java.util.function.Predicate<Profiler.Profile> filter, java.io.PrintStream stream)Report summarized profile to givenPrintStream.voidwriteXML(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:XMLWriteableWrite this object to given XMLOutput.- Specified by:
writeXMLin interfaceXMLWriteable- Parameters:
xmlOutput- the XMLOutput for the document- Throws:
java.io.IOException
-
getProfile
public Profiler.Profile getProfile(java.lang.Class<?> clazz)
- Specified by:
getProfilein interfaceIProfiler
-
-