Class TraceEventViewer


  • public final class TraceEventViewer
    extends java.lang.Object
    This class converts from the Trace Event json data into a full HTML page. It includes the trace viewer from Catapult, the Chromium trace UI.

    This class is separate from TraceEventWriter, because it includes a fairly large HTML chunk, and brings in a differently licenced piece of code.

    This code is NOT API stable, and may be removed in the future, or changed without notice.

    Since:
    0.17.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.file.Path writeTraceHtml()
      A convenience function around writeTraceHtml(Writer).
      static void writeTraceHtml​(java.io.Writer writer)
      Writes all available trace data as a single HTML file into the given writer.
      • Methods inherited from class java.lang.Object

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

      • writeTraceHtml

        @CanIgnoreReturnValue
        public static java.nio.file.Path writeTraceHtml()
                                                 throws java.io.IOException
        A convenience function around writeTraceHtml(Writer). This writes the trace data to a temporary file and logs the output location.
        Returns:
        the Path of the written file.
        Throws:
        java.io.IOException - if it can't write to the destination.
      • writeTraceHtml

        public static void writeTraceHtml​(java.io.Writer writer)
                                   throws java.io.IOException
        Writes all available trace data as a single HTML file into the given writer.
        Parameters:
        writer - The destination to write all HTML to.
        Throws:
        java.io.IOException - if it can't write to the writer.