func NewOptions() Options {
	bufferedEncoderPool := msgpack.NewBufferedEncoderPool(nil)
	bufferedEncoderPool.Init(func() msgpack.BufferedEncoder {
		return msgpack.NewPooledBufferedEncoder(bufferedEncoderPool)
	})
	return &options{
		clockOpts:                clock.NewOptions(),
		instrumentOpts:           instrument.NewOptions(),
		maxBufferSize:            defaultMaxBufferSize,
		bufferedEncoderPool:      bufferedEncoderPool,
		encodingTimeSamplingRate: defaultEncodingTimeSamplingRate,
	}
}
NewOptions provide a set of writer options.
package writer
import (
	"github.com/m3db/m3metrics/encoding/msgpack"
	"github.com/m3db/m3x/clock"
	"github.com/m3db/m3x/instrument"
)
const (
	defaultMaxBufferSize            = 1440
	defaultEncodingTimeSamplingRate = 0
)
type Options interface {
	SetClockOptions(value clock.Options) Options
	ClockOptions() clock.Options
	SetInstrumentOptions(value instrument.Options) Options
	InstrumentOptions() instrument.Options
	SetMaxBufferSize(value int) Options
	MaxBufferSize() int
	SetBufferedEncoderPool(value msgpack.BufferedEncoderPool) Options
	BufferedEncoderPool() msgpack.BufferedEncoderPool
	SetEncodingTimeSamplingRate(value float64) Options
	EncodingTimeSamplingRate() float64
}
type options struct {
	clockOpts                clock.Options
	instrumentOpts           instrument.Options
	maxBufferSize            int
	bufferedEncoderPool      msgpack.BufferedEncoderPool
	encodingTimeSamplingRate float64
}