metrics

package
v0.0.0-...-f1a3a7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package metrics provides a bleve.store.KVStore implementation that wraps another, real KVStore implementation, and uses go-metrics to track runtime performance metrics.

Index

Constants

View Source
const MaxErrors = 100
View Source
const Name = "metrics"

Variables

This section is empty.

Functions

func New

func New(mo store.MergeOperator, config map[string]interface{}) (store.KVStore, error)

func WriteTimerCSV

func WriteTimerCSV(w io.Writer, timer metrics.Timer)

func WriteTimerCSVHeader

func WriteTimerCSVHeader(w io.Writer, prefix string)

func WriteTimerJSON

func WriteTimerJSON(w io.Writer, timer metrics.Timer)

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func (*Batch) Close

func (b *Batch) Close() error

func (*Batch) Delete

func (b *Batch) Delete(key []byte)

func (*Batch) Merge

func (b *Batch) Merge(key, val []byte)

func (*Batch) Reset

func (b *Batch) Reset()

func (*Batch) Set

func (b *Batch) Set(key, val []byte)

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func (*Iterator) Close

func (i *Iterator) Close() error

func (*Iterator) Current

func (i *Iterator) Current() ([]byte, []byte, bool)

func (*Iterator) Key

func (i *Iterator) Key() []byte

func (*Iterator) Next

func (i *Iterator) Next()

func (*Iterator) Seek

func (i *Iterator) Seek(x []byte)

func (*Iterator) Valid

func (i *Iterator) Valid() bool

func (*Iterator) Value

func (i *Iterator) Value() []byte

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Get

func (r *Reader) Get(key []byte) (v []byte, err error)

func (*Reader) MultiGet

func (r *Reader) MultiGet(keys [][]byte) (vals [][]byte, err error)

func (*Reader) PrefixIterator

func (r *Reader) PrefixIterator(prefix []byte) (i store.KVIterator)

func (*Reader) RangeIterator

func (r *Reader) RangeIterator(start, end []byte) (i store.KVIterator)

type Store

type Store struct {
	TimerReaderGet            metrics.Timer
	TimerReaderMultiGet       metrics.Timer
	TimerReaderPrefixIterator metrics.Timer
	TimerReaderRangeIterator  metrics.Timer
	TimerWriterExecuteBatch   metrics.Timer
	TimerIteratorSeek         metrics.Timer
	TimerIteratorNext         metrics.Timer
	TimerBatchMerge           metrics.Timer
	// contains filtered or unexported fields
}

func (*Store) AddError

func (s *Store) AddError(op string, err error, key []byte)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Reader

func (s *Store) Reader() (store.KVReader, error)

func (*Store) WriteCSV

func (s *Store) WriteCSV(w io.Writer)

func (*Store) WriteCSVHeader

func (s *Store) WriteCSVHeader(w io.Writer)

func (*Store) WriteJSON

func (s *Store) WriteJSON(w io.Writer) (err error)

func (*Store) Writer

func (s *Store) Writer() (store.KVWriter, error)

type StoreError

type StoreError struct {
	Time string
	Op   string
	Err  string
	Key  string
}

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) ExecuteBatch

func (w *Writer) ExecuteBatch(b store.KVBatch) (err error)

func (*Writer) NewBatch

func (w *Writer) NewBatch() store.KVBatch

func (*Writer) NewBatchEx

func (w *Writer) NewBatchEx(options store.KVBatchOptions) ([]byte, store.KVBatch, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL