Package org.rocksdb

Class Statistics

All Implemented Interfaces:
AutoCloseable

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

  • Method Details

    • 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 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 String toString()
      String representation of the statistic object.
      Overrides:
      toString in class Object
    • disposeInternal

      protected final void disposeInternal(long handle)
      Specified by:
      disposeInternal in class RocksObject