Commit Graph

11 Commits (cfcf2ae34f1573f8c6e5edb89fcb30a1b176a64d)

Author SHA1 Message Date
Edd Robinson 270f917fcf fix: enable uint64 support 2019-11-01 10:55:54 +00:00
Stuart Carnie 4da079410f
feat(models): New APIs to create Tags from a list of key, value pairs
* New API to convert `models.Tags` to a slice of key, value pairs

```
BenchmarkNewTagsKeyValues/sorted/no_dupes/preallocate-8         	20000000	        63.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewTagsKeyValues/sorted/no_dupes/allocate-8            	10000000	       124 ns/op	     144 B/op	       1 allocs/op
BenchmarkNewTagsKeyValues/sorted/dupes-8                        	10000000	       181 ns/op	     240 B/op	       1 allocs/op
BenchmarkNewTagsKeyValues/unsorted/no_dupes-8                   	10000000	       204 ns/op	     176 B/op	       2 allocs/op
BenchmarkNewTagsKeyValues/unsorted/dupes-8                      	 5000000	       308 ns/op	     272 B/op	       2 allocs/op
```
2019-09-11 16:37:57 -07:00
Stuart Carnie 87bfa06a1e
feat(storage): Add ParseTagsWithTags API
This API is a benefit when the caller is only interested in parsing
tags and reusing an existing Tags buffer. It will be used by the
storage schema APIs.
2019-04-24 11:14:22 -07:00
Ben Johnson 272f340c30
Merge point parse & explode. 2019-04-24 10:12:15 -06:00
Edd Robinson 9949fef2a5 Only validate tag pairs are valid unicode
We will want to validate that all tag key/value data is valid unicode.
This commit changes the validation helper to only validate provided
tags, since measurements are currently very likely to contain invalid
utf-8 characters.

There are two exceptions to the tag validation: the validation of the
special tag keys for measurements and field keys.
2019-03-07 09:56:07 +00:00
Ben Johnson 12d35f1a50
Revert "Merge point parse & explode."
This reverts commit 1004abc3e1.
2019-03-02 06:23:04 -07:00
Ben Johnson 1004abc3e1
Merge point parse & explode. 2019-03-01 15:55:37 -07:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Chris Goller 65bf4bb383 feat(models): only use common SI time units for timestamp precision
Closes #1959
2018-12-20 22:39:24 -06:00
Mark Rushakoff ed4bba83f5 test(models): don't reassign package variable
Prior to this change, `go test -count=2 ./models` would fail like:

--- FAIL: TestMarshal (0.00s)
    points_test.go:37: got:  ,A\ FOO=bar,APPLE=orange,host=serverA,region=uswest
    points_test.go:38: exp:  ,apple=orange,foo=bar,host=serverA,region=uswest
    points_test.go:39: invalid match

because a later test reassigned the package-level variable that
TestMarshal depends on. Don't reassign that variable anymore.

Also cleaned up some whitespace, and moved an init function to the top
of the file for visibility.
2018-11-12 08:24:14 -08:00
Edd Robinson 04818c7859 Initial import of models package 2018-10-01 12:03:19 +01:00