func ParseKey(buf string) (string, Tags, error) {
	_, keyBuf, err := scanKey([]byte(buf), 0)
	tags := parseTags([]byte(buf))
	return string(keyBuf), tags, err
}
ParseKey returns the measurement name and tags from a point.
package models  
import (
	"bytes"
	"encoding/binary"
	"errors"
	"fmt"
	"hash/fnv"
	"math"
	"sort"
	"strconv"
	"strings"
	"time"
	"github.com/influxdata/influxdb/pkg/escape"
)
var (
	measurementEscapeCodes = map[byte][]byte{
		',': []byte(`\,`),
		' ': []byte(`\ `),
	}
	tagEscapeCodes = map[byte][]byte{
		',': []byte(`\,`),
		' ': []byte(`\ `),
		'=': []byte(`\=`),
	}
	ErrPointMustHaveAField = errors.New("point without fields is unsupported")
)
type Point interface {
	Name() string
	SetName(string)
	Tags() Tags
	AddTag(key, value string)
	SetTags(tags Tags)
	Fields() Fields
	Time() time.Time
	SetTime(t time.Time)
	UnixNano() int64
	HashID() uint64
	Key() []byte
	Data() []byte
	SetData(buf []byte)
	String() string
	MarshalBinary() ([]byte, error)
	PrecisionString(precision string) string
	RoundedString(d time.Duration) string
}
type Points []Point
func (a Points) Len() int           { return len(a) }
func (a Points) Less(i, j int) bool { return a[i].Time().Before(a[j].Time()) }
func (a Points) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
type point struct {
	time time.Time
	key []byte
	fields []byte
	ts []byte
	data []byte
	cachedFields map[string]interface{}
	cachedName string
}
const (
	maxInt64Digits = 19
	minInt64Digits = 20
	maxFloat64Digits = 25
	minFloat64Digits = 27
)
func ParsePoints(buf []byte) ([]Point, error) {
	return ParsePointsWithPrecision(buf, time.Now().UTC(), "n")
}
func ParsePointsString(buf string) ([]Point, error) {
	return ParsePoints([]byte(buf))
}