The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RocksDB::Statistics - rocksdb::Statistics object

SYNOPSIS

  use RocksDB;

  my $db = RocksDB->new('/path/to/rocks.db', {
      enable_statistics => 1,
  })
  my $stats = $db->get_statistics;
  print $stats->get_ticker_count('rocksdb.block.cache.miss');
  my $data = $stats->histogram_data('rocksdb.write.raw.block.micros');
  print $data->{average};
  my $hashref = $db->to_hashref;
  print $stats->to_string;

DESCRIPTION

RocksDB::Statistics is a rocksdb::Statistics object.

METHODS

$stats->get_ticker_count($key) :Int

Returns the count.

$stats->histogram_data($key) :HashRef

Returns the HistogramData as HashRef.

  {
    median => 0,
    percentile95 => 0,
    percentile99 => 0,
    average => 0,
    standard_deviation => 0,
  }

$stats->to_hashref :HashRef

Returns a HashRef includes all tickers and histograms.

$stats->to_string :HashRef

String representation of the statistic object.

SEE ALSO

RocksDB

AUTHOR

Jiro Nishiguchi <jiro@cpan.org>