Class Profiler

java.lang.Object
edu.umd.cs.findbugs.log.Profiler
All Implemented Interfaces:
XMLWriteable

public class Profiler extends Object implements XMLWriteable
Author:
pugh
  • Constructor Details

    • Profiler

      public Profiler()
  • Method Details

    • startContext

      public void startContext(Object context)
    • endContext

      public void endContext(Object context)
    • start

      public void start(Class<?> c)
    • end

      public void end(Class<?> c)
    • report

      public void report()
      Default implementation uses Profiler.TotalTimeComparator and prints out class statistics based on total time spent fot a class
    • report

      public void report(Comparator<Class<?>> reportComparator, Profiler.Filter filter, PrintStream stream)
      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

      public Profiler.Profile getProfile(Class<?> c)
    • writeXML

      public void writeXML(XMLOutput xmlOutput) throws 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:
      IOException