Class 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger LOG  
      private 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 given PrintStream.
      void writeXML​(XMLOutput xmlOutput)
      Write this object to given XMLOutput.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final org.slf4j.Logger LOG
      • profilers

        private final Profiler[] profilers
    • Constructor Detail

    • 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 by PrintStream.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 interface XMLWriteable
        Parameters:
        xmlOutput - the XMLOutput for the document
        Throws:
        java.io.IOException