Package org.rocksdb

Class Statistics

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Statistics
    extends RocksObject
    Statistics to analyze the performance of a db. Pointer for statistics object is managed by Options class.
    • Constructor Detail

      • Statistics

        public Statistics()
      • Statistics

        public Statistics​(Statistics otherStatistics)
      • Statistics

        public Statistics​(java.util.EnumSet<HistogramType> ignoreHistograms)
      • Statistics

        public Statistics​(java.util.EnumSet<HistogramType> ignoreHistograms,
                          Statistics otherStatistics)
    • Method Detail

      • statsLevel

        public StatsLevel statsLevel()
        Gets the current stats level.
        Returns:
        The stats level.
      • setStatsLevel

        public void setStatsLevel​(StatsLevel statsLevel)
        Sets the stats level.
        Parameters:
        statsLevel - The stats level to set.
      • getTickerCount

        public long getTickerCount​(TickerType tickerType)
        Get the count for a ticker.
        Parameters:
        tickerType - The ticker to get the count for
        Returns:
        The count for the ticker
      • getAndResetTickerCount

        public long getAndResetTickerCount​(TickerType tickerType)
        Get the count for a ticker and reset the tickers count.
        Parameters:
        tickerType - The ticker to get the count for
        Returns:
        The count for the ticker
      • getHistogramData

        public HistogramData getHistogramData​(HistogramType histogramType)
        Gets the histogram data for a particular histogram.
        Parameters:
        histogramType - The histogram to retrieve the data for
        Returns:
        The histogram data
      • getHistogramString

        public java.lang.String getHistogramString​(HistogramType histogramType)
        Gets a string representation of a particular histogram.
        Parameters:
        histogramType - The histogram to retrieve the data for
        Returns:
        A string representation of the histogram data
      • reset

        public void reset()
                   throws RocksDBException
        Resets all ticker and histogram stats.
        Throws:
        RocksDBException - if an error occurs when resetting the statistics.
      • toString

        public java.lang.String toString()
        String representation of the statistic object.
        Overrides:
        toString in class java.lang.Object