Interface JavaVirtualMachine

    • Method Detail

      • accepts

        boolean accepts​(DataSource dataSource)
        Parameters:
        dataSource - the log to be considered. Return true if the JavaVirtualMachine implementation can work with the GC log.
        Returns:
        true if the JavaVirtualMachine implementation can work with the GC Log.
      • isUnifiedLogging

        boolean isUnifiedLogging()
        True if the log is unified or false for preunified
        Returns:
        true is the log is from JDK 9+
      • isG1GC

        boolean isG1GC()
        Return true if the JVM was using G1GC.
        Returns:
        true if the GC is G1GC.
      • isZGC

        boolean isZGC()
        Return true if the JVM was using ZGC.
        Returns:
        true if the GC is ZGC.
      • isShenandoah

        boolean isShenandoah()
        Return true if the JVM was using Shenandoah.
        Returns:
        true if the GC is Shenandoah.
      • isParallel

        boolean isParallel()
        Return true if the JVM was using Parallel GC.
        Returns:
        true if the GC is Parallel GC.
      • isSerial

        boolean isSerial()
        Return true if the JVM was using Serial GC.
        Returns:
        true if the GC is Serial GC.
      • isCMS

        boolean isCMS()
        Return true if the JVM was using CMS GC.
        Returns:
        true if the GC is CMS GC.
      • getCommandLine

        String getCommandLine()
        Return the command line used to run the JVM, if available.
        Returns:
        The command line used to run the JVM, or null
      • getTimeOfFirstEvent

        DateTimeStamp getTimeOfFirstEvent()
        Return the time of the first event in the GC log file.
        Returns:
        The time of the last event.
      • getEstimatedJVMStartTime

        DateTimeStamp getEstimatedJVMStartTime()
        Estimates the initial start time of the log in the case that the log is determined to be a fragment. Otherwise, return a start time of 0.000 seconds
        Returns:
        The time of the first event.
      • getJVMTerminationTime

        DateTimeStamp getJVMTerminationTime()
        Return the time of the last event in the GC log file.
        Returns:
        The time of the last event.
      • getRuntimeDuration

        double getRuntimeDuration()
        Return the runtime duration. This is not necessarily the difference between the first and last event. Rather, this calculation considers the duration of the events.
        Returns:
        The runtime duration that the GC log represents.
      • getAggregation

        <T extends AggregationOptional<T> getAggregation​(Class<T> aggregationClass)
        Return the Aggregation that was used in the analysis of the GC log file that is the same class as aggregationClass. In other words, aggregationClass is a key used to look up an instance of the Aggregation. The return value may be null if the Aggregation was not used in the analysis. Which Aggregations are used depends on the GC.
        Type Parameters:
        T - type cast for the Aggregation class type.
        Parameters:
        aggregationClass - The class of the Aggregation to be returned.
        Returns:
        an Aggregation whose getClass() == aggregationClass, or null if given aggregationClass is not available.
      • analyze

        void analyze​(List<Aggregator<? extends Aggregation>> registeredAggregations,
                     JVMEventChannel eventChannel,
                     DataSourceChannel dataSourceChannel)
        Interface to trigger the analysis of a gc log.
        Parameters:
        registeredAggregations - all aggregations supplied by the module SPI
        eventChannel - JVMEvent message channel
        dataSourceChannel - GC logging data channel