Skip to content

Commit

Permalink
Add GetStatisticsString method to Options
Browse files Browse the repository at this point in the history
  • Loading branch information
bmermet committed Dec 15, 2018
1 parent 8752a94 commit e0ef1dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,13 @@ func (opts *Options) SetFIFOCompactionOptions(value *FIFOCompactionOptions) {
C.rocksdb_options_set_fifo_compaction_options(opts.c, value.c)
}

// GetStatisticsString returns the statistics as a string.
func (opts *Options) GetStatisticsString() string {
sString := C.rocksdb_options_statistics_get_string(opts.c)
defer C.free(unsafe.Pointer(sString))
return C.GoString(sString)
}

// SetRateLimiter sets the rate limiter of the options.
// Use to control write rate of flush and compaction. Flush has higher
// priority than compaction. Rate limiting is disabled if nullptr.
Expand Down

0 comments on commit e0ef1dd

Please sign in to comment.