From 0c2af21550563c79ccb8a9e17361266347cc8117 Mon Sep 17 00:00:00 2001 From: Alex Le Date: Tue, 18 Apr 2023 01:01:34 -0700 Subject: [PATCH] Upgrade prometheus to 7309ac272195cb856b879306d6a27af7641d3346 (#6287) * Upgrade prometheus to 7309ac272195cb856b879306d6a27af7641d3346 Signed-off-by: Alex Le * Reverted test code Signed-off-by: Alex Le * Updated comment Signed-off-by: Alex Le * docs: mismatch in changelog Signed-off-by: Etienne Martel Signed-off-by: Alex Le * Updates busybox SHA (#6283) Signed-off-by: GitHub Co-authored-by: fpetkovski Signed-off-by: Alex Le * trigger workflow Signed-off-by: Alex Le * trigger workflow Signed-off-by: Alex Le --------- Signed-off-by: Alex Le Signed-off-by: Etienne Martel Signed-off-by: GitHub Co-authored-by: Etienne Martel Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: fpetkovski --- go.mod | 12 +- go.sum | 35 +++-- internal/cortex/util/metrics_helper.go | 4 +- pkg/alert/alert.go | 2 +- pkg/api/query/grpc.go | 7 +- pkg/api/query/v1_test.go | 84 +++++------- pkg/compact/downsample/downsample.go | 2 +- pkg/compact/downsample/downsample_test.go | 6 +- pkg/dedup/chunk_iter_test.go | 2 +- pkg/dedup/iter.go | 2 +- pkg/dedup/iter_test.go | 152 +++++++++++----------- pkg/promclient/promclient.go | 3 +- pkg/query/querier_test.go | 78 +++++------ pkg/query/remote_engine.go | 11 +- pkg/query/test_test.go | 24 ++-- pkg/rules/manager_test.go | 6 +- pkg/store/storepb/prompb/samples.go | 23 +++- 17 files changed, 225 insertions(+), 228 deletions(-) diff --git a/go.mod b/go.mod index 4c30070cf1..8587f5efa1 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/leanovate/gopter v0.2.9 github.com/lightstep/lightstep-tracer-go v0.25.0 github.com/lovoo/gcloud-opentracing v0.3.0 - github.com/miekg/dns v1.1.51 + github.com/miekg/dns v1.1.53 github.com/minio/minio-go/v7 v7.0.45 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f github.com/oklog/run v1.1.0 @@ -64,10 +64,10 @@ require ( github.com/prometheus/common v0.42.0 github.com/prometheus/exporter-toolkit v0.9.1 // Prometheus maps version 2.x.y to tags v0.x.y. - github.com/prometheus/prometheus v0.43.0 + github.com/prometheus/prometheus v0.43.1-0.20230414053501-7309ac272195 github.com/sony/gobreaker v0.5.0 github.com/stretchr/testify v1.8.2 - github.com/thanos-community/promql-engine v0.0.0-20230408100057-190e5c3be03f + github.com/thanos-community/promql-engine v0.0.0-20230417154848-c2396ed5afd9 github.com/thanos-io/objstore v0.0.0-20230201072718-11ffbc490204 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.4.1+incompatible // indirect @@ -88,7 +88,7 @@ require ( golang.org/x/sync v0.1.0 golang.org/x/text v0.8.0 golang.org/x/time v0.3.0 - google.golang.org/api v0.111.0 // indirect + google.golang.org/api v0.114.0 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.53.0 google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429 @@ -185,7 +185,7 @@ require ( github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect @@ -244,7 +244,7 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/gonum v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.29.0 // indirect + google.golang.org/protobuf v1.29.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect ) diff --git a/go.sum b/go.sum index 2dbde1e769..4eccd1d027 100644 --- a/go.sum +++ b/go.sum @@ -78,7 +78,7 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.5.1 h1:BMTdr+ib5ljLa9MxT github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.5.1/go.mod h1:c6WvOhtmjNUWbLfOG1qxM/q0SPvQNSVJvolm+C52dIU= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= @@ -227,7 +227,7 @@ github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgz github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/digitalocean/godo v1.97.0 h1:p9w1yCcWMZcxFSLPToNGXA96WfUVLXqoHti6GzVomL4= +github.com/digitalocean/godo v1.98.0 h1:potyC1eD0N9n5/P4/WmJuKgg+OGYZOBWEW+/aKTX6QQ= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= @@ -500,8 +500,8 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3 h1:eHv/jVY/JNop1xg2J9cBb4EzyMpWZoNCP1BslSAIkOI= github.com/gophercloud/gophercloud v1.2.0 h1:1oXyj4g54KBg/kFtCdMM6jtxSzeIyg8wv4z1HoGPp1E= @@ -574,7 +574,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1: github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ionos-cloud/sdk-go/v6 v6.1.4 h1:BJHhFA8Q1SZC7VOXqKKr2BV2ysQ2/4hlk1e4hZte7GY= +github.com/ionos-cloud/sdk-go/v6 v6.1.5 h1:BFqThLOgrGJWeo7w6UDyYuNxyi/GqEmNPl7C/YcQ8Fw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -663,8 +663,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= -github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= +github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= +github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.45 h1:g4IeM9M9pW/Lo8AGGNOjBZYlvmtlE1N5TQEYWXRWzIs= @@ -816,8 +816,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= -github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= +github.com/prometheus/prometheus v0.43.1-0.20230414053501-7309ac272195 h1:KA2VSZefqFxYYWGZRnF8ug5s/+NUavrhH9iiu2guC8Y= +github.com/prometheus/prometheus v0.43.1-0.20230414053501-7309ac272195/go.mod h1:L8xLODXgpZM57D1MA7SPgsDecKj6ez4AF7mMczR1bis= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -891,8 +891,8 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4 github.com/tencentyun/cos-go-sdk-v5 v0.7.40/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM= -github.com/thanos-community/promql-engine v0.0.0-20230408100057-190e5c3be03f h1:4ge+1AbTQbMIs0JKhNnPVTLGhWTopwBjqe7IA2YuZXw= -github.com/thanos-community/promql-engine v0.0.0-20230408100057-190e5c3be03f/go.mod h1:S8AAs4c5yPtp7PecQgQWE/MhSx1LMbRil6HqvKq9pBo= +github.com/thanos-community/promql-engine v0.0.0-20230417154848-c2396ed5afd9 h1:PdI6eklbpSZPC2+B2F2KKTwg1TNKY2QsuC6ayBs6M5o= +github.com/thanos-community/promql-engine v0.0.0-20230417154848-c2396ed5afd9/go.mod h1:mnjFTl5zZ9Rf0/xatwl+lGKvxjeJuUEysBrXYKEVnsM= github.com/thanos-io/objstore v0.0.0-20230201072718-11ffbc490204 h1:W4w5Iph7j32Sf1QFWLJDCqvO0WgZS0jHGID+qnq3wV0= github.com/thanos-io/objstore v0.0.0-20230201072718-11ffbc490204/go.mod h1:STSgpY8M6EKF2G/raUFdbIMf2U9GgYlEjAEHJxjvpAo= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU= @@ -1074,7 +1074,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1133,7 +1132,6 @@ golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1267,13 +1265,11 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1357,7 +1353,6 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1411,8 +1406,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.111.0 h1:bwKi+z2BsdwYFRKrqwutM+axAlYLz83gt5pDSXCJT+0= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= +google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1525,8 +1520,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0= -google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/cortex/util/metrics_helper.go b/internal/cortex/util/metrics_helper.go index 2fac9bf4e4..2a3feeb8f8 100644 --- a/internal/cortex/util/metrics_helper.go +++ b/internal/cortex/util/metrics_helper.go @@ -716,7 +716,7 @@ func FromLabelPairsToLabels(pairs []*dto.LabelPair) labels.Labels { for _, pair := range pairs { builder.Set(pair.GetName(), pair.GetValue()) } - return builder.Labels(nil) + return builder.Labels() } // GetSumOfHistogramSampleCount returns the sum of samples count of histograms matching the provided metric name @@ -782,7 +782,7 @@ nextMetric: lbls.Set(lp.GetName(), lp.GetValue()) } - result = append(result, lbls.Labels(nil)) + result = append(result, lbls.Labels()) } return result, errs.Err() diff --git a/pkg/alert/alert.go b/pkg/alert/alert.go index 45b6ae2fda..f53f348eab 100644 --- a/pkg/alert/alert.go +++ b/pkg/alert/alert.go @@ -184,7 +184,7 @@ func (q *Queue) Push(alerts []*notifier.Alert) { lb.Set(l.Name, l.Value) } - if lset, keep := relabel.Process(lb.Labels(nil), q.alertRelabelConfigs...); keep { + if lset, keep := relabel.Process(lb.Labels(), q.alertRelabelConfigs...); keep { a.Labels = lset relabeledAlerts = append(relabeledAlerts, a) } diff --git a/pkg/api/query/grpc.go b/pkg/api/query/grpc.go index 42929eff64..ae555439ca 100644 --- a/pkg/api/query/grpc.go +++ b/pkg/api/query/grpc.go @@ -144,7 +144,7 @@ func (g *GRPCAPI) Query(request *querypb.QueryRequest, server querypb.Query_Quer } case promql.Vector: for _, sample := range vector { - floats, histograms := prompb.SamplesFromPromqlPoints(sample.Point) + floats, histograms := prompb.SamplesFromPromqlSamples(sample) series := &prompb.TimeSeries{ Labels: labelpb.ZLabelsFromPromLabels(sample.Metric), Samples: floats, @@ -239,7 +239,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que switch value := result.Value.(type) { case promql.Matrix: for _, series := range value { - floats, histograms := prompb.SamplesFromPromqlPoints(series.Points...) + floats, histograms := prompb.SamplesFromPromqlSeries(series) series := &prompb.TimeSeries{ Labels: labelpb.ZLabelsFromPromLabels(series.Metric), Samples: floats, @@ -251,8 +251,7 @@ func (g *GRPCAPI) QueryRange(request *querypb.QueryRangeRequest, srv querypb.Que } case promql.Vector: for _, sample := range value { - point := promql.Point{T: sample.T, V: sample.V, H: sample.H} - floats, histograms := prompb.SamplesFromPromqlPoints(point) + floats, histograms := prompb.SamplesFromPromqlSamples(sample) series := &prompb.TimeSeries{ Labels: labelpb.ZLabelsFromPromLabels(sample.Metric), Samples: floats, diff --git a/pkg/api/query/v1_test.go b/pkg/api/query/v1_test.go index 565c3e60d0..1707cd9a67 100644 --- a/pkg/api/query/v1_test.go +++ b/pkg/api/query/v1_test.go @@ -277,10 +277,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "a", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -297,10 +295,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "a", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -317,10 +313,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "b", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -337,10 +331,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "a", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, }, }, @@ -367,10 +359,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "bar", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -383,10 +373,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "boo", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -403,10 +391,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "a", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, }, }, @@ -433,10 +419,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "bar", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, { Metric: labels.Labels{ @@ -449,10 +433,8 @@ func TestQueryEndpoints(t *testing.T) { Value: "boo", }, }, - Point: promql.Point{ - T: 123000, - V: 2, - }, + T: 123000, + F: 2, }, }, }, @@ -491,10 +473,10 @@ func TestQueryEndpoints(t *testing.T) { ResultType: parser.ValueTypeMatrix, Result: promql.Matrix{ promql.Series{ - Points: func(end, step float64) []promql.Point { - var res []promql.Point + Floats: func(end, step float64) []promql.FPoint { + var res []promql.FPoint for v := float64(0); v <= end; v += step { - res = append(res, promql.Point{V: v, T: timestamp.FromTime(start.Add(time.Duration(v) * time.Second))}) + res = append(res, promql.FPoint{F: v, T: timestamp.FromTime(start.Add(time.Duration(v) * time.Second))}) } return res }(500, 1), @@ -515,10 +497,10 @@ func TestQueryEndpoints(t *testing.T) { ResultType: parser.ValueTypeMatrix, Result: promql.Matrix{ promql.Series{ - Points: []promql.Point{ - {V: 0, T: timestamp.FromTime(start)}, - {V: 1, T: timestamp.FromTime(start.Add(1 * time.Second))}, - {V: 2, T: timestamp.FromTime(start.Add(2 * time.Second))}, + Floats: []promql.FPoint{ + {F: 0, T: timestamp.FromTime(start)}, + {F: 1, T: timestamp.FromTime(start.Add(1 * time.Second))}, + {F: 2, T: timestamp.FromTime(start.Add(2 * time.Second))}, }, Metric: nil, }, @@ -714,7 +696,7 @@ func TestMetadataEndpoints(t *testing.T) { for i := int64(0); i < 10; i++ { samples = append(samples, sample{ t: i * 60_000, - v: float64(i), + f: float64(i), }) } @@ -1840,16 +1822,16 @@ func BenchmarkQueryResultEncoding(b *testing.B) { "namespace", "something", "long-label", "34grnt83j0qxj309je9rgt9jf2jd-92jd-92jf9wrfjre", ) - var points []promql.Point + var points []promql.FPoint for j := 0; j < b.N/1000; j++ { - points = append(points, promql.Point{ + points = append(points, promql.FPoint{ T: int64(j * 10000), - V: rand.Float64(), + F: rand.Float64(), }) } mat = append(mat, promql.Series{ Metric: lset, - Points: points, + Floats: points, }) } input := &queryData{ @@ -1874,15 +1856,15 @@ func (c mockedRulesClient) Rules(_ context.Context, req *rulespb.RulesRequest) ( type sample struct { t int64 - v float64 + f float64 } func (s sample) T() int64 { return s.t } -func (s sample) V() float64 { - return s.v +func (s sample) F() float64 { + return s.f } // TODO(rabenhorst): Needs to be implemented for native histogram support. diff --git a/pkg/compact/downsample/downsample.go b/pkg/compact/downsample/downsample.go index d55c95f449..16cec6b67b 100644 --- a/pkg/compact/downsample/downsample.go +++ b/pkg/compact/downsample/downsample.go @@ -776,7 +776,7 @@ func (it *AverageChunkIterator) Err() error { func SamplesFromTSDBSamples(samples []tsdbutil.Sample) []sample { res := make([]sample, len(samples)) for i, s := range samples { - res[i] = sample{t: s.T(), v: s.V()} + res[i] = sample{t: s.T(), v: s.F()} } return res } diff --git a/pkg/compact/downsample/downsample_test.go b/pkg/compact/downsample/downsample_test.go index 14c4d4dea8..2e136f217e 100644 --- a/pkg/compact/downsample/downsample_test.go +++ b/pkg/compact/downsample/downsample_test.go @@ -912,15 +912,15 @@ func TestSamplesFromTSDBSamples(t *testing.T) { // testSample implements tsdbutil.Sample interface. type testSample struct { t int64 - v float64 + f float64 } func (s testSample) T() int64 { return s.t } -func (s testSample) V() float64 { - return s.v +func (s testSample) F() float64 { + return s.f } // TODO(rabenhorst): Needs to be implemented for native histogram support. diff --git a/pkg/dedup/chunk_iter_test.go b/pkg/dedup/chunk_iter_test.go index 29ee674e03..dbcf7d1097 100644 --- a/pkg/dedup/chunk_iter_test.go +++ b/pkg/dedup/chunk_iter_test.go @@ -319,7 +319,7 @@ func createSamplesWithStep(start, numOfSamples, step int) []tsdbutil.Sample { res := make([]tsdbutil.Sample, numOfSamples) cur := start for i := 0; i < numOfSamples; i++ { - res[i] = sample{t: int64(cur), v: float64(cur)} + res[i] = sample{t: int64(cur), f: float64(cur)} cur += step } diff --git a/pkg/dedup/iter.go b/pkg/dedup/iter.go index 49d0bf5b62..31b63cfad2 100644 --- a/pkg/dedup/iter.go +++ b/pkg/dedup/iter.go @@ -118,7 +118,7 @@ func NewSeriesSet(set storage.SeriesSet, f string, pushdownEnabled bool) storage // trimPushdownMarker trims the pushdown marker from the given labels. // Returns true if there was a pushdown marker. func trimPushdownMarker(lbls labels.Labels) (labels.Labels, bool) { - return labels.NewBuilder(lbls).Del(PushdownMarker.Name).Labels(nil), lbls.Has(PushdownMarker.Name) + return labels.NewBuilder(lbls).Del(PushdownMarker.Name).Labels(), lbls.Has(PushdownMarker.Name) } func (s *dedupSeriesSet) Next() bool { diff --git a/pkg/dedup/iter_test.go b/pkg/dedup/iter_test.go index 1dd280ec5c..3579f69fd0 100644 --- a/pkg/dedup/iter_test.go +++ b/pkg/dedup/iter_test.go @@ -22,15 +22,15 @@ import ( type sample struct { t int64 - v float64 + f float64 } func (s sample) T() int64 { return s.t } -func (s sample) V() float64 { - return s.v +func (s sample) F() float64 { + return s.f } // TODO(rabenhorst): Needs to be implemented for native histogram support. @@ -96,7 +96,7 @@ func (s *mockedSeriesIterator) Seek(t int64) chunkenc.ValueType { func (s *mockedSeriesIterator) At() (t int64, v float64) { sample := s.samples[s.cur] - return sample.t, sample.v + return sample.t, sample.f } // TODO(rabenhorst): Needs to be implemented for native histogram support. @@ -124,26 +124,26 @@ func (s *mockedSeriesIterator) Next() chunkenc.ValueType { func (s *mockedSeriesIterator) Err() error { return nil } var expectedRealSeriesWithStaleMarkerDeduplicatedForRate = []sample{ - {t: 1587690005791, v: 461968}, {t: 1587690020791, v: 462151}, {t: 1587690035797, v: 462336}, {t: 1587690050791, v: 462650}, {t: 1587690065791, v: 462813}, {t: 1587690080791, v: 462987}, {t: 1587690095791, v: 463095}, {t: 1587690110791, v: 463247}, {t: 1587690125791, v: 463440}, {t: 1587690140791, v: 463642}, {t: 1587690155791, v: 463811}, {t: 1587690170791, v: 464027}, - {t: 1587690185791, v: 464308}, {t: 1587690200791, v: 464514}, {t: 1587690215791, v: 464798}, {t: 1587690230791, v: 465018}, {t: 1587690245791, v: 465215}, {t: 1587690260813, v: 465431}, {t: 1587690275791, v: 465651}, {t: 1587690290791, v: 465870}, {t: 1587690305791, v: 466070}, {t: 1587690320792, v: 466248}, {t: 1587690335791, v: 466506}, {t: 1587690350791, v: 466766}, - {t: 1587690365791, v: 466970}, {t: 1587690380791, v: 467123}, {t: 1587690395791, v: 467265}, {t: 1587690410791, v: 467383}, {t: 1587690425791, v: 467629}, {t: 1587690440791, v: 467931}, {t: 1587690455791, v: 468097}, {t: 1587690470791, v: 468281}, {t: 1587690485791, v: 468477}, {t: 1587690500791, v: 468649}, {t: 1587690515791, v: 468867}, {t: 1587690530791, v: 469150}, - {t: 1587690545791, v: 469268}, {t: 1587690560791, v: 469488}, {t: 1587690575791, v: 469742}, {t: 1587690590791, v: 469951}, {t: 1587690605791, v: 470131}, {t: 1587690620791, v: 470337}, {t: 1587690635791, v: 470631}, {t: 1587690650791, v: 470832}, {t: 1587690665791, v: 471077}, {t: 1587690680791, v: 471311}, {t: 1587690695791, v: 471473}, {t: 1587690710791, v: 471728}, - {t: 1587690725791, v: 472002}, {t: 1587690740791, v: 472158}, {t: 1587690755791, v: 472329}, {t: 1587690770791, v: 472722}, {t: 1587690785791, v: 472925}, {t: 1587690800791, v: 473220}, {t: 1587690815791, v: 473460}, {t: 1587690830791, v: 473748}, {t: 1587690845791, v: 473968}, {t: 1587690860791, v: 474261}, {t: 1587690875791, v: 474418}, {t: 1587690890791, v: 474726}, - {t: 1587690905791, v: 474913}, {t: 1587690920791, v: 475031}, {t: 1587690935791, v: 475284}, {t: 1587690950791, v: 475563}, {t: 1587690965791, v: 475762}, {t: 1587690980791, v: 475945}, {t: 1587690995791, v: 476302}, {t: 1587691010791, v: 476501}, {t: 1587691025791, v: 476849}, {t: 1587691040800, v: 477020}, {t: 1587691055791, v: 477280}, {t: 1587691070791, v: 477549}, - {t: 1587691085791, v: 477758}, {t: 1587691100817, v: 477960}, {t: 1587691115791, v: 478261}, {t: 1587691130791, v: 478559}, {t: 1587691145791, v: 478704}, {t: 1587691160804, v: 478950}, {t: 1587691175791, v: 479173}, {t: 1587691190791, v: 479368}, {t: 1587691205791, v: 479625}, {t: 1587691220805, v: 479866}, {t: 1587691235791, v: 480008}, {t: 1587691250791, v: 480155}, - {t: 1587691265791, v: 480472}, {t: 1587691280811, v: 480598}, {t: 1587691295791, v: 480771}, {t: 1587691310791, v: 480996}, {t: 1587691325791, v: 481200}, {t: 1587691340803, v: 481381}, {t: 1587691355791, v: 481584}, {t: 1587691370791, v: 481759}, {t: 1587691385791, v: 482003}, {t: 1587691400803, v: 482189}, {t: 1587691415791, v: 482457}, {t: 1587691430791, v: 482623}, - {t: 1587691445791, v: 482768}, {t: 1587691460804, v: 483036}, {t: 1587691475791, v: 483322}, {t: 1587691490791, v: 483566}, {t: 1587691505791, v: 483709}, {t: 1587691520807, v: 483838}, {t: 1587691535791, v: 484091}, {t: 1587691550791, v: 484236}, {t: 1587691565791, v: 484454}, {t: 1587691580816, v: 484710}, {t: 1587691595791, v: 484978}, {t: 1587691610791, v: 485271}, - {t: 1587691625791, v: 485476}, {t: 1587691640792, v: 485640}, {t: 1587691655791, v: 485921}, {t: 1587691670791, v: 486201}, {t: 1587691685791, v: 486555}, {t: 1587691700791, v: 486691}, {t: 1587691715791, v: 486831}, {t: 1587691730791, v: 487033}, {t: 1587691745791, v: 487268}, {t: 1587691760803, v: 487370}, {t: 1587691775791, v: 487571}, {t: 1587691790791, v: 487787}, - {t: 1587691805791, v: 488036}, {t: 1587691820791, v: 488241}, {t: 1587691835791, v: 488411}, {t: 1587691850791, v: 488625}, {t: 1587691865791, v: 488868}, {t: 1587691880791, v: 489005}, {t: 1587691895791, v: 489237}, {t: 1587691910791, v: 489545}, {t: 1587691925791, v: 489750}, {t: 1587691940791, v: 489899}, {t: 1587691955791, v: 490048}, {t: 1587691970791, v: 490364}, - {t: 1587691985791, v: 490485}, {t: 1587692000791, v: 490722}, {t: 1587692015791, v: 490866}, {t: 1587692030791, v: 491025}, {t: 1587692045791, v: 491286}, {t: 1587692060816, v: 491543}, {t: 1587692075791, v: 491787}, {t: 1587692090791, v: 492065}, {t: 1587692105791, v: 492223}, {t: 1587692120816, v: 492501}, {t: 1587692135791, v: 492767}, {t: 1587692150791, v: 492955}, - {t: 1587692165791, v: 493194}, {t: 1587692180792, v: 493402}, {t: 1587692195791, v: 493647}, {t: 1587692210791, v: 493897}, {t: 1587692225791, v: 494117}, {t: 1587692240805, v: 494356}, {t: 1587692255791, v: 494620}, {t: 1587692270791, v: 494762}, {t: 1587692285791, v: 495001}, {t: 1587692300805, v: 495222}, {t: 1587692315791, v: 495393}, {t: 1587692330791, v: 495662}, - {t: 1587692345791, v: 495875}, {t: 1587692360801, v: 496082}, {t: 1587692375791, v: 496196}, {t: 1587692390791, v: 496245}, {t: 1587692405791, v: 496295}, {t: 1587692420791, v: 496365}, {t: 1587692435791, v: 496401}, {t: 1587692450791, v: 496452}, {t: 1587692465791, v: 496491}, {t: 1587692480791, v: 496544}, {t: 1587692542149, v: 496544}, {t: 1587692557139, v: 496640}, - {t: 1587692572139, v: 496851}, {t: 1587692587139, v: 497047}, {t: 1587692602144, v: 497264}, {t: 1587692617139, v: 497529}, {t: 1587692632139, v: 497717}, {t: 1587692647139, v: 497945}, {t: 1587692662154, v: 498179}, {t: 1587692677139, v: 498466}, {t: 1587692692139, v: 498642}, {t: 1587692707139, v: 498839}, {t: 1587692722139, v: 499021}, {t: 1587692737139, v: 499177}, - {t: 1587692752139, v: 499345}, {t: 1587692767139, v: 499518}, {t: 1587692782149, v: 499726}, {t: 1587692797139, v: 499980}, {t: 1587692812139, v: 500196}, {t: 1587692827139, v: 500366}, {t: 1587692842139, v: 500524}, {t: 1587692857139, v: 500734}, {t: 1587692872139, v: 500966}, {t: 1587692887139, v: 501185}, {t: 1587692902139, v: 501253}, {t: 1587692917153, v: 501411}, - {t: 1587692932139, v: 501670}, {t: 1587692947139, v: 501857}, {t: 1587692962139, v: 502110}, {t: 1587692977155, v: 502287}, {t: 1587692992139, v: 502569}, {t: 1587693007139, v: 502749}, {t: 1587693022139, v: 502938}, {t: 1587693037139, v: 503197}, {t: 1587693052139, v: 503435}, {t: 1587693067139, v: 503637}, {t: 1587693082139, v: 503880}, {t: 1587693097139, v: 504034}, - {t: 1587693112139, v: 504186}, {t: 1587693127139, v: 504369}, {t: 1587693142139, v: 504597}, {t: 1587693157139, v: 504748}, {t: 1587693172139, v: 505063}, {t: 1587693187139, v: 505251}, {t: 1587693202139, v: 505443}, {t: 1587693217139, v: 505642}, {t: 1587693232139, v: 505943}, {t: 1587693247155, v: 506095}, {t: 1587693262139, v: 506316}, {t: 1587693277139, v: 506531}, - {t: 1587693292139, v: 506807}, {t: 1587693307139, v: 507017}, {t: 1587693322139, v: 507293}, {t: 1587693337139, v: 507537}, {t: 1587693352139, v: 507788}, {t: 1587693367139, v: 507998}, {t: 1587693382139, v: 508317}, {t: 1587693397139, v: 508577}, {t: 1587693412139, v: 508777}, {t: 1587693427139, v: 508989}, {t: 1587693442163, v: 509281}, {t: 1587693457139, v: 509484}, - {t: 1587693472139, v: 509720}, {t: 1587693487139, v: 509979}, {t: 1587693502139, v: 510189}, {t: 1587693517139, v: 510505}, {t: 1587693532139, v: 510661}, {t: 1587693547139, v: 510866}, {t: 1587693562139, v: 511131}, {t: 1587693577139, v: 511321}, {t: 1587693592139, v: 511495}, + {t: 1587690005791, f: 461968}, {t: 1587690020791, f: 462151}, {t: 1587690035797, f: 462336}, {t: 1587690050791, f: 462650}, {t: 1587690065791, f: 462813}, {t: 1587690080791, f: 462987}, {t: 1587690095791, f: 463095}, {t: 1587690110791, f: 463247}, {t: 1587690125791, f: 463440}, {t: 1587690140791, f: 463642}, {t: 1587690155791, f: 463811}, {t: 1587690170791, f: 464027}, + {t: 1587690185791, f: 464308}, {t: 1587690200791, f: 464514}, {t: 1587690215791, f: 464798}, {t: 1587690230791, f: 465018}, {t: 1587690245791, f: 465215}, {t: 1587690260813, f: 465431}, {t: 1587690275791, f: 465651}, {t: 1587690290791, f: 465870}, {t: 1587690305791, f: 466070}, {t: 1587690320792, f: 466248}, {t: 1587690335791, f: 466506}, {t: 1587690350791, f: 466766}, + {t: 1587690365791, f: 466970}, {t: 1587690380791, f: 467123}, {t: 1587690395791, f: 467265}, {t: 1587690410791, f: 467383}, {t: 1587690425791, f: 467629}, {t: 1587690440791, f: 467931}, {t: 1587690455791, f: 468097}, {t: 1587690470791, f: 468281}, {t: 1587690485791, f: 468477}, {t: 1587690500791, f: 468649}, {t: 1587690515791, f: 468867}, {t: 1587690530791, f: 469150}, + {t: 1587690545791, f: 469268}, {t: 1587690560791, f: 469488}, {t: 1587690575791, f: 469742}, {t: 1587690590791, f: 469951}, {t: 1587690605791, f: 470131}, {t: 1587690620791, f: 470337}, {t: 1587690635791, f: 470631}, {t: 1587690650791, f: 470832}, {t: 1587690665791, f: 471077}, {t: 1587690680791, f: 471311}, {t: 1587690695791, f: 471473}, {t: 1587690710791, f: 471728}, + {t: 1587690725791, f: 472002}, {t: 1587690740791, f: 472158}, {t: 1587690755791, f: 472329}, {t: 1587690770791, f: 472722}, {t: 1587690785791, f: 472925}, {t: 1587690800791, f: 473220}, {t: 1587690815791, f: 473460}, {t: 1587690830791, f: 473748}, {t: 1587690845791, f: 473968}, {t: 1587690860791, f: 474261}, {t: 1587690875791, f: 474418}, {t: 1587690890791, f: 474726}, + {t: 1587690905791, f: 474913}, {t: 1587690920791, f: 475031}, {t: 1587690935791, f: 475284}, {t: 1587690950791, f: 475563}, {t: 1587690965791, f: 475762}, {t: 1587690980791, f: 475945}, {t: 1587690995791, f: 476302}, {t: 1587691010791, f: 476501}, {t: 1587691025791, f: 476849}, {t: 1587691040800, f: 477020}, {t: 1587691055791, f: 477280}, {t: 1587691070791, f: 477549}, + {t: 1587691085791, f: 477758}, {t: 1587691100817, f: 477960}, {t: 1587691115791, f: 478261}, {t: 1587691130791, f: 478559}, {t: 1587691145791, f: 478704}, {t: 1587691160804, f: 478950}, {t: 1587691175791, f: 479173}, {t: 1587691190791, f: 479368}, {t: 1587691205791, f: 479625}, {t: 1587691220805, f: 479866}, {t: 1587691235791, f: 480008}, {t: 1587691250791, f: 480155}, + {t: 1587691265791, f: 480472}, {t: 1587691280811, f: 480598}, {t: 1587691295791, f: 480771}, {t: 1587691310791, f: 480996}, {t: 1587691325791, f: 481200}, {t: 1587691340803, f: 481381}, {t: 1587691355791, f: 481584}, {t: 1587691370791, f: 481759}, {t: 1587691385791, f: 482003}, {t: 1587691400803, f: 482189}, {t: 1587691415791, f: 482457}, {t: 1587691430791, f: 482623}, + {t: 1587691445791, f: 482768}, {t: 1587691460804, f: 483036}, {t: 1587691475791, f: 483322}, {t: 1587691490791, f: 483566}, {t: 1587691505791, f: 483709}, {t: 1587691520807, f: 483838}, {t: 1587691535791, f: 484091}, {t: 1587691550791, f: 484236}, {t: 1587691565791, f: 484454}, {t: 1587691580816, f: 484710}, {t: 1587691595791, f: 484978}, {t: 1587691610791, f: 485271}, + {t: 1587691625791, f: 485476}, {t: 1587691640792, f: 485640}, {t: 1587691655791, f: 485921}, {t: 1587691670791, f: 486201}, {t: 1587691685791, f: 486555}, {t: 1587691700791, f: 486691}, {t: 1587691715791, f: 486831}, {t: 1587691730791, f: 487033}, {t: 1587691745791, f: 487268}, {t: 1587691760803, f: 487370}, {t: 1587691775791, f: 487571}, {t: 1587691790791, f: 487787}, + {t: 1587691805791, f: 488036}, {t: 1587691820791, f: 488241}, {t: 1587691835791, f: 488411}, {t: 1587691850791, f: 488625}, {t: 1587691865791, f: 488868}, {t: 1587691880791, f: 489005}, {t: 1587691895791, f: 489237}, {t: 1587691910791, f: 489545}, {t: 1587691925791, f: 489750}, {t: 1587691940791, f: 489899}, {t: 1587691955791, f: 490048}, {t: 1587691970791, f: 490364}, + {t: 1587691985791, f: 490485}, {t: 1587692000791, f: 490722}, {t: 1587692015791, f: 490866}, {t: 1587692030791, f: 491025}, {t: 1587692045791, f: 491286}, {t: 1587692060816, f: 491543}, {t: 1587692075791, f: 491787}, {t: 1587692090791, f: 492065}, {t: 1587692105791, f: 492223}, {t: 1587692120816, f: 492501}, {t: 1587692135791, f: 492767}, {t: 1587692150791, f: 492955}, + {t: 1587692165791, f: 493194}, {t: 1587692180792, f: 493402}, {t: 1587692195791, f: 493647}, {t: 1587692210791, f: 493897}, {t: 1587692225791, f: 494117}, {t: 1587692240805, f: 494356}, {t: 1587692255791, f: 494620}, {t: 1587692270791, f: 494762}, {t: 1587692285791, f: 495001}, {t: 1587692300805, f: 495222}, {t: 1587692315791, f: 495393}, {t: 1587692330791, f: 495662}, + {t: 1587692345791, f: 495875}, {t: 1587692360801, f: 496082}, {t: 1587692375791, f: 496196}, {t: 1587692390791, f: 496245}, {t: 1587692405791, f: 496295}, {t: 1587692420791, f: 496365}, {t: 1587692435791, f: 496401}, {t: 1587692450791, f: 496452}, {t: 1587692465791, f: 496491}, {t: 1587692480791, f: 496544}, {t: 1587692542149, f: 496544}, {t: 1587692557139, f: 496640}, + {t: 1587692572139, f: 496851}, {t: 1587692587139, f: 497047}, {t: 1587692602144, f: 497264}, {t: 1587692617139, f: 497529}, {t: 1587692632139, f: 497717}, {t: 1587692647139, f: 497945}, {t: 1587692662154, f: 498179}, {t: 1587692677139, f: 498466}, {t: 1587692692139, f: 498642}, {t: 1587692707139, f: 498839}, {t: 1587692722139, f: 499021}, {t: 1587692737139, f: 499177}, + {t: 1587692752139, f: 499345}, {t: 1587692767139, f: 499518}, {t: 1587692782149, f: 499726}, {t: 1587692797139, f: 499980}, {t: 1587692812139, f: 500196}, {t: 1587692827139, f: 500366}, {t: 1587692842139, f: 500524}, {t: 1587692857139, f: 500734}, {t: 1587692872139, f: 500966}, {t: 1587692887139, f: 501185}, {t: 1587692902139, f: 501253}, {t: 1587692917153, f: 501411}, + {t: 1587692932139, f: 501670}, {t: 1587692947139, f: 501857}, {t: 1587692962139, f: 502110}, {t: 1587692977155, f: 502287}, {t: 1587692992139, f: 502569}, {t: 1587693007139, f: 502749}, {t: 1587693022139, f: 502938}, {t: 1587693037139, f: 503197}, {t: 1587693052139, f: 503435}, {t: 1587693067139, f: 503637}, {t: 1587693082139, f: 503880}, {t: 1587693097139, f: 504034}, + {t: 1587693112139, f: 504186}, {t: 1587693127139, f: 504369}, {t: 1587693142139, f: 504597}, {t: 1587693157139, f: 504748}, {t: 1587693172139, f: 505063}, {t: 1587693187139, f: 505251}, {t: 1587693202139, f: 505443}, {t: 1587693217139, f: 505642}, {t: 1587693232139, f: 505943}, {t: 1587693247155, f: 506095}, {t: 1587693262139, f: 506316}, {t: 1587693277139, f: 506531}, + {t: 1587693292139, f: 506807}, {t: 1587693307139, f: 507017}, {t: 1587693322139, f: 507293}, {t: 1587693337139, f: 507537}, {t: 1587693352139, f: 507788}, {t: 1587693367139, f: 507998}, {t: 1587693382139, f: 508317}, {t: 1587693397139, f: 508577}, {t: 1587693412139, f: 508777}, {t: 1587693427139, f: 508989}, {t: 1587693442163, f: 509281}, {t: 1587693457139, f: 509484}, + {t: 1587693472139, f: 509720}, {t: 1587693487139, f: 509979}, {t: 1587693502139, f: 510189}, {t: 1587693517139, f: 510505}, {t: 1587693532139, f: 510661}, {t: 1587693547139, f: 510866}, {t: 1587693562139, f: 511131}, {t: 1587693577139, f: 511321}, {t: 1587693592139, f: 511495}, } type chunkedSeries struct { @@ -466,56 +466,56 @@ func TestDedupSeriesSet(t *testing.T) { { lset: labels.Labels{{Name: "a", Value: "1"}}, samples: []sample{ - {t: 1587690007139, v: 461993}, {t: 1587690022139, v: 462164}, {t: 1587690037139, v: 462409}, {t: 1587690052139, v: 462662}, {t: 1587690067139, v: 462824}, {t: 1587690082139, v: 462987}, {t: 1587690097155, v: 463108}, {t: 1587690112139, v: 463261}, {t: 1587690127139, v: 463465}, {t: 1587690142139, v: 463642}, - {t: 1587690157139, v: 463823}, {t: 1587690172139, v: 464065}, {t: 1587690187139, v: 464333}, {t: 1587690202139, v: 464566}, {t: 1587690217139, v: 464811}, {t: 1587690232140, v: 465032}, {t: 1587690247139, v: 465229}, {t: 1587690262139, v: 465445}, {t: 1587690277139, v: 465700}, {t: 1587690292139, v: 465884}, - {t: 1587690307139, v: 466083}, {t: 1587690322139, v: 466250}, {t: 1587690337150, v: 466534}, {t: 1587690352139, v: 466791}, {t: 1587690367139, v: 466970}, {t: 1587690382139, v: 467149}, {t: 1587690397139, v: 467265}, {t: 1587690412139, v: 467383}, {t: 1587690427139, v: 467647}, {t: 1587690442139, v: 467943}, - {t: 1587690457139, v: 468121}, {t: 1587690472139, v: 468294}, {t: 1587690487139, v: 468545}, {t: 1587690502139, v: 468676}, {t: 1587690517139, v: 468879}, {t: 1587690532139, v: 469154}, {t: 1587690547139, v: 469281}, {t: 1587690562139, v: 469512}, {t: 1587690577139, v: 469783}, {t: 1587690592139, v: 469964}, - {t: 1587690607139, v: 470171}, {t: 1587690622139, v: 470355}, {t: 1587690637139, v: 470656}, {t: 1587690652139, v: 470845}, {t: 1587690667139, v: 471077}, {t: 1587690682139, v: 471315}, {t: 1587690697139, v: 471535}, {t: 1587690712139, v: 471766}, {t: 1587690727139, v: 472002}, {t: 1587690742139, v: 472171}, - {t: 1587690757139, v: 472354}, {t: 1587690772139, v: 472736}, {t: 1587690787139, v: 472948}, {t: 1587690802139, v: 473259}, {t: 1587690817139, v: 473460}, {t: 1587690832139, v: 473753}, {t: 1587690847139, v: 474007}, {t: 1587690862139, v: 474286}, {t: 1587690877139, v: 474423}, {t: 1587690892139, v: 474788}, - {t: 1587690907139, v: 474925}, {t: 1587690922139, v: 475031}, {t: 1587690937139, v: 475316}, {t: 1587690952139, v: 475573}, {t: 1587690967139, v: 475784}, {t: 1587690982139, v: 475992}, {t: 1587690997139, v: 476341}, {t: 1587691012139, v: 476541}, {t: 1587691027139, v: 476890}, {t: 1587691042139, v: 477033}, - {t: 1587691057139, v: 477305}, {t: 1587691072139, v: 477577}, {t: 1587691087139, v: 477771}, {t: 1587691102139, v: 478012}, {t: 1587691117139, v: 478296}, {t: 1587691132139, v: 478559}, {t: 1587691147139, v: 478744}, {t: 1587691162139, v: 478950}, {t: 1587691177139, v: 479201}, {t: 1587691192139, v: 479388}, - {t: 1587691207139, v: 479638}, {t: 1587691222154, v: 479907}, {t: 1587691237139, v: 480008}, {t: 1587691252139, v: 480167}, {t: 1587691267139, v: 480472}, {t: 1587691282157, v: 480615}, {t: 1587691297139, v: 480771}, {t: 1587691312139, v: 481027}, {t: 1587691327139, v: 481212}, {t: 1587691342159, v: 481395}, - {t: 1587691357139, v: 481598}, {t: 1587691372139, v: 481786}, {t: 1587691387139, v: 482003}, {t: 1587691402141, v: 482236}, {t: 1587691417139, v: 482508}, {t: 1587691432139, v: 482636}, {t: 1587691447139, v: 482780}, {t: 1587691462139, v: 483059}, {t: 1587691477139, v: 483357}, {t: 1587691492139, v: 483566}, - {t: 1587691507139, v: 483711}, {t: 1587691522139, v: 483838}, {t: 1587691537139, v: 484091}, {t: 1587691552139, v: 484254}, {t: 1587691567139, v: 484479}, {t: 1587691582139, v: 484748}, {t: 1587691597139, v: 484978}, {t: 1587691612139, v: 485271}, {t: 1587691627139, v: 485488}, {t: 1587691642139, v: 485700}, - {t: 1587691657139, v: 485945}, {t: 1587691672139, v: 486228}, {t: 1587691687139, v: 486588}, {t: 1587691702139, v: 486691}, {t: 1587691717139, v: 486881}, {t: 1587691732139, v: 487046}, {t: 1587691747139, v: 487291}, {t: 1587691762177, v: 487410}, {t: 1587691777139, v: 487571}, {t: 1587691792139, v: 487799}, - {t: 1587691807139, v: 488050}, {t: 1587691822139, v: 488241}, {t: 1587691837139, v: 488424}, {t: 1587691852139, v: 488629}, {t: 1587691867139, v: 488875}, {t: 1587691882139, v: 489017}, {t: 1587691897139, v: 489254}, {t: 1587691912139, v: 489545}, {t: 1587691927139, v: 489778}, {t: 1587691942139, v: 489912}, - {t: 1587691957139, v: 490084}, {t: 1587691972139, v: 490364}, {t: 1587691987139, v: 490510}, {t: 1587692002139, v: 490744}, {t: 1587692017139, v: 490880}, {t: 1587692032139, v: 491025}, {t: 1587692047139, v: 491297}, {t: 1587692062155, v: 491557}, {t: 1587692077139, v: 491839}, {t: 1587692092139, v: 492065}, - {t: 1587692107139, v: 492234}, {t: 1587692122139, v: 492526}, {t: 1587692137139, v: 492767}, {t: 1587692152139, v: 492967}, {t: 1587692167139, v: 493218}, {t: 1587692182139, v: 493442}, {t: 1587692197139, v: 493647}, {t: 1587692212139, v: 493920}, {t: 1587692227139, v: 494170}, {t: 1587692242139, v: 494358}, - {t: 1587692257139, v: 494632}, {t: 1587692272139, v: 494800}, {t: 1587692287139, v: 495026}, {t: 1587692302139, v: 495222}, {t: 1587692317139, v: 495433}, {t: 1587692332139, v: 495677}, {t: 1587692347139, v: 495901}, {t: 1587692362139, v: 496107}, {t: 1587692377139, v: 496196}, {t: 1587692392139, v: 496245}, - {t: 1587692407139, v: 496300}, {t: 1587692422159, v: 496365}, {t: 1587692437139, v: 496401}, {t: 1587692452139, v: 496452}, {t: 1587692467139, v: 496532}, {t: 1587692542149, v: 496537}, {t: 1587692557139, v: 496633}, {t: 1587692572139, v: 496844}, {t: 1587692587139, v: 497040}, {t: 1587692602144, v: 497257}, - {t: 1587692617139, v: 497522}, {t: 1587692632139, v: 497710}, {t: 1587692647139, v: 497938}, {t: 1587692662154, v: 498172}, {t: 1587692677139, v: 498459}, {t: 1587692692139, v: 498635}, {t: 1587692707139, v: 498832}, {t: 1587692722139, v: 499014}, {t: 1587692737139, v: 499170}, {t: 1587692752139, v: 499338}, - {t: 1587692767139, v: 499511}, {t: 1587692782149, v: 499719}, {t: 1587692797139, v: 499973}, {t: 1587692812139, v: 500189}, {t: 1587692827139, v: 500359}, {t: 1587692842139, v: 500517}, {t: 1587692857139, v: 500727}, {t: 1587692872139, v: 500959}, {t: 1587692887139, v: 501178}, {t: 1587692902139, v: 501246}, - {t: 1587692917153, v: 501404}, {t: 1587692932139, v: 501663}, {t: 1587692947139, v: 501850}, {t: 1587692962139, v: 502103}, {t: 1587692977155, v: 502280}, {t: 1587692992139, v: 502562}, {t: 1587693007139, v: 502742}, {t: 1587693022139, v: 502931}, {t: 1587693037139, v: 503190}, {t: 1587693052139, v: 503428}, - {t: 1587693067139, v: 503630}, {t: 1587693082139, v: 503873}, {t: 1587693097139, v: 504027}, {t: 1587693112139, v: 504179}, {t: 1587693127139, v: 504362}, {t: 1587693142139, v: 504590}, {t: 1587693157139, v: 504741}, {t: 1587693172139, v: 505056}, {t: 1587693187139, v: 505244}, {t: 1587693202139, v: 505436}, - {t: 1587693217139, v: 505635}, {t: 1587693232139, v: 505936}, {t: 1587693247155, v: 506088}, {t: 1587693262139, v: 506309}, {t: 1587693277139, v: 506524}, {t: 1587693292139, v: 506800}, {t: 1587693307139, v: 507010}, {t: 1587693322139, v: 507286}, {t: 1587693337139, v: 507530}, {t: 1587693352139, v: 507781}, - {t: 1587693367139, v: 507991}, {t: 1587693382139, v: 508310}, {t: 1587693397139, v: 508570}, {t: 1587693412139, v: 508770}, {t: 1587693427139, v: 508982}, {t: 1587693442163, v: 509274}, {t: 1587693457139, v: 509477}, {t: 1587693472139, v: 509713}, {t: 1587693487139, v: 509972}, {t: 1587693502139, v: 510182}, - {t: 1587693517139, v: 510498}, {t: 1587693532139, v: 510654}, {t: 1587693547139, v: 510859}, {t: 1587693562139, v: 511124}, {t: 1587693577139, v: 511314}, {t: 1587693592139, v: 511488}, + {t: 1587690007139, f: 461993}, {t: 1587690022139, f: 462164}, {t: 1587690037139, f: 462409}, {t: 1587690052139, f: 462662}, {t: 1587690067139, f: 462824}, {t: 1587690082139, f: 462987}, {t: 1587690097155, f: 463108}, {t: 1587690112139, f: 463261}, {t: 1587690127139, f: 463465}, {t: 1587690142139, f: 463642}, + {t: 1587690157139, f: 463823}, {t: 1587690172139, f: 464065}, {t: 1587690187139, f: 464333}, {t: 1587690202139, f: 464566}, {t: 1587690217139, f: 464811}, {t: 1587690232140, f: 465032}, {t: 1587690247139, f: 465229}, {t: 1587690262139, f: 465445}, {t: 1587690277139, f: 465700}, {t: 1587690292139, f: 465884}, + {t: 1587690307139, f: 466083}, {t: 1587690322139, f: 466250}, {t: 1587690337150, f: 466534}, {t: 1587690352139, f: 466791}, {t: 1587690367139, f: 466970}, {t: 1587690382139, f: 467149}, {t: 1587690397139, f: 467265}, {t: 1587690412139, f: 467383}, {t: 1587690427139, f: 467647}, {t: 1587690442139, f: 467943}, + {t: 1587690457139, f: 468121}, {t: 1587690472139, f: 468294}, {t: 1587690487139, f: 468545}, {t: 1587690502139, f: 468676}, {t: 1587690517139, f: 468879}, {t: 1587690532139, f: 469154}, {t: 1587690547139, f: 469281}, {t: 1587690562139, f: 469512}, {t: 1587690577139, f: 469783}, {t: 1587690592139, f: 469964}, + {t: 1587690607139, f: 470171}, {t: 1587690622139, f: 470355}, {t: 1587690637139, f: 470656}, {t: 1587690652139, f: 470845}, {t: 1587690667139, f: 471077}, {t: 1587690682139, f: 471315}, {t: 1587690697139, f: 471535}, {t: 1587690712139, f: 471766}, {t: 1587690727139, f: 472002}, {t: 1587690742139, f: 472171}, + {t: 1587690757139, f: 472354}, {t: 1587690772139, f: 472736}, {t: 1587690787139, f: 472948}, {t: 1587690802139, f: 473259}, {t: 1587690817139, f: 473460}, {t: 1587690832139, f: 473753}, {t: 1587690847139, f: 474007}, {t: 1587690862139, f: 474286}, {t: 1587690877139, f: 474423}, {t: 1587690892139, f: 474788}, + {t: 1587690907139, f: 474925}, {t: 1587690922139, f: 475031}, {t: 1587690937139, f: 475316}, {t: 1587690952139, f: 475573}, {t: 1587690967139, f: 475784}, {t: 1587690982139, f: 475992}, {t: 1587690997139, f: 476341}, {t: 1587691012139, f: 476541}, {t: 1587691027139, f: 476890}, {t: 1587691042139, f: 477033}, + {t: 1587691057139, f: 477305}, {t: 1587691072139, f: 477577}, {t: 1587691087139, f: 477771}, {t: 1587691102139, f: 478012}, {t: 1587691117139, f: 478296}, {t: 1587691132139, f: 478559}, {t: 1587691147139, f: 478744}, {t: 1587691162139, f: 478950}, {t: 1587691177139, f: 479201}, {t: 1587691192139, f: 479388}, + {t: 1587691207139, f: 479638}, {t: 1587691222154, f: 479907}, {t: 1587691237139, f: 480008}, {t: 1587691252139, f: 480167}, {t: 1587691267139, f: 480472}, {t: 1587691282157, f: 480615}, {t: 1587691297139, f: 480771}, {t: 1587691312139, f: 481027}, {t: 1587691327139, f: 481212}, {t: 1587691342159, f: 481395}, + {t: 1587691357139, f: 481598}, {t: 1587691372139, f: 481786}, {t: 1587691387139, f: 482003}, {t: 1587691402141, f: 482236}, {t: 1587691417139, f: 482508}, {t: 1587691432139, f: 482636}, {t: 1587691447139, f: 482780}, {t: 1587691462139, f: 483059}, {t: 1587691477139, f: 483357}, {t: 1587691492139, f: 483566}, + {t: 1587691507139, f: 483711}, {t: 1587691522139, f: 483838}, {t: 1587691537139, f: 484091}, {t: 1587691552139, f: 484254}, {t: 1587691567139, f: 484479}, {t: 1587691582139, f: 484748}, {t: 1587691597139, f: 484978}, {t: 1587691612139, f: 485271}, {t: 1587691627139, f: 485488}, {t: 1587691642139, f: 485700}, + {t: 1587691657139, f: 485945}, {t: 1587691672139, f: 486228}, {t: 1587691687139, f: 486588}, {t: 1587691702139, f: 486691}, {t: 1587691717139, f: 486881}, {t: 1587691732139, f: 487046}, {t: 1587691747139, f: 487291}, {t: 1587691762177, f: 487410}, {t: 1587691777139, f: 487571}, {t: 1587691792139, f: 487799}, + {t: 1587691807139, f: 488050}, {t: 1587691822139, f: 488241}, {t: 1587691837139, f: 488424}, {t: 1587691852139, f: 488629}, {t: 1587691867139, f: 488875}, {t: 1587691882139, f: 489017}, {t: 1587691897139, f: 489254}, {t: 1587691912139, f: 489545}, {t: 1587691927139, f: 489778}, {t: 1587691942139, f: 489912}, + {t: 1587691957139, f: 490084}, {t: 1587691972139, f: 490364}, {t: 1587691987139, f: 490510}, {t: 1587692002139, f: 490744}, {t: 1587692017139, f: 490880}, {t: 1587692032139, f: 491025}, {t: 1587692047139, f: 491297}, {t: 1587692062155, f: 491557}, {t: 1587692077139, f: 491839}, {t: 1587692092139, f: 492065}, + {t: 1587692107139, f: 492234}, {t: 1587692122139, f: 492526}, {t: 1587692137139, f: 492767}, {t: 1587692152139, f: 492967}, {t: 1587692167139, f: 493218}, {t: 1587692182139, f: 493442}, {t: 1587692197139, f: 493647}, {t: 1587692212139, f: 493920}, {t: 1587692227139, f: 494170}, {t: 1587692242139, f: 494358}, + {t: 1587692257139, f: 494632}, {t: 1587692272139, f: 494800}, {t: 1587692287139, f: 495026}, {t: 1587692302139, f: 495222}, {t: 1587692317139, f: 495433}, {t: 1587692332139, f: 495677}, {t: 1587692347139, f: 495901}, {t: 1587692362139, f: 496107}, {t: 1587692377139, f: 496196}, {t: 1587692392139, f: 496245}, + {t: 1587692407139, f: 496300}, {t: 1587692422159, f: 496365}, {t: 1587692437139, f: 496401}, {t: 1587692452139, f: 496452}, {t: 1587692467139, f: 496532}, {t: 1587692542149, f: 496537}, {t: 1587692557139, f: 496633}, {t: 1587692572139, f: 496844}, {t: 1587692587139, f: 497040}, {t: 1587692602144, f: 497257}, + {t: 1587692617139, f: 497522}, {t: 1587692632139, f: 497710}, {t: 1587692647139, f: 497938}, {t: 1587692662154, f: 498172}, {t: 1587692677139, f: 498459}, {t: 1587692692139, f: 498635}, {t: 1587692707139, f: 498832}, {t: 1587692722139, f: 499014}, {t: 1587692737139, f: 499170}, {t: 1587692752139, f: 499338}, + {t: 1587692767139, f: 499511}, {t: 1587692782149, f: 499719}, {t: 1587692797139, f: 499973}, {t: 1587692812139, f: 500189}, {t: 1587692827139, f: 500359}, {t: 1587692842139, f: 500517}, {t: 1587692857139, f: 500727}, {t: 1587692872139, f: 500959}, {t: 1587692887139, f: 501178}, {t: 1587692902139, f: 501246}, + {t: 1587692917153, f: 501404}, {t: 1587692932139, f: 501663}, {t: 1587692947139, f: 501850}, {t: 1587692962139, f: 502103}, {t: 1587692977155, f: 502280}, {t: 1587692992139, f: 502562}, {t: 1587693007139, f: 502742}, {t: 1587693022139, f: 502931}, {t: 1587693037139, f: 503190}, {t: 1587693052139, f: 503428}, + {t: 1587693067139, f: 503630}, {t: 1587693082139, f: 503873}, {t: 1587693097139, f: 504027}, {t: 1587693112139, f: 504179}, {t: 1587693127139, f: 504362}, {t: 1587693142139, f: 504590}, {t: 1587693157139, f: 504741}, {t: 1587693172139, f: 505056}, {t: 1587693187139, f: 505244}, {t: 1587693202139, f: 505436}, + {t: 1587693217139, f: 505635}, {t: 1587693232139, f: 505936}, {t: 1587693247155, f: 506088}, {t: 1587693262139, f: 506309}, {t: 1587693277139, f: 506524}, {t: 1587693292139, f: 506800}, {t: 1587693307139, f: 507010}, {t: 1587693322139, f: 507286}, {t: 1587693337139, f: 507530}, {t: 1587693352139, f: 507781}, + {t: 1587693367139, f: 507991}, {t: 1587693382139, f: 508310}, {t: 1587693397139, f: 508570}, {t: 1587693412139, f: 508770}, {t: 1587693427139, f: 508982}, {t: 1587693442163, f: 509274}, {t: 1587693457139, f: 509477}, {t: 1587693472139, f: 509713}, {t: 1587693487139, f: 509972}, {t: 1587693502139, f: 510182}, + {t: 1587693517139, f: 510498}, {t: 1587693532139, f: 510654}, {t: 1587693547139, f: 510859}, {t: 1587693562139, f: 511124}, {t: 1587693577139, f: 511314}, {t: 1587693592139, f: 511488}, }, }, { lset: labels.Labels{{Name: "a", Value: "1"}}, samples: []sample{ - {t: 1587690005791, v: 461968}, {t: 1587690020791, v: 462151}, {t: 1587690035797, v: 462336}, {t: 1587690050791, v: 462650}, {t: 1587690065791, v: 462813}, {t: 1587690080791, v: 462987}, {t: 1587690095791, v: 463095}, {t: 1587690110791, v: 463247}, {t: 1587690125791, v: 463440}, {t: 1587690140791, v: 463642}, {t: 1587690155791, v: 463811}, - {t: 1587690170791, v: 464027}, {t: 1587690185791, v: 464308}, {t: 1587690200791, v: 464514}, {t: 1587690215791, v: 464798}, {t: 1587690230791, v: 465018}, {t: 1587690245791, v: 465215}, {t: 1587690260813, v: 465431}, {t: 1587690275791, v: 465651}, {t: 1587690290791, v: 465870}, {t: 1587690305791, v: 466070}, {t: 1587690320792, v: 466248}, - {t: 1587690335791, v: 466506}, {t: 1587690350791, v: 466766}, {t: 1587690365791, v: 466970}, {t: 1587690380791, v: 467123}, {t: 1587690395791, v: 467265}, {t: 1587690410791, v: 467383}, {t: 1587690425791, v: 467629}, {t: 1587690440791, v: 467931}, {t: 1587690455791, v: 468097}, {t: 1587690470791, v: 468281}, {t: 1587690485791, v: 468477}, - {t: 1587690500791, v: 468649}, {t: 1587690515791, v: 468867}, {t: 1587690530791, v: 469150}, {t: 1587690545791, v: 469268}, {t: 1587690560791, v: 469488}, {t: 1587690575791, v: 469742}, {t: 1587690590791, v: 469951}, {t: 1587690605791, v: 470131}, {t: 1587690620791, v: 470337}, {t: 1587690635791, v: 470631}, {t: 1587690650791, v: 470832}, - {t: 1587690665791, v: 471077}, {t: 1587690680791, v: 471311}, {t: 1587690695791, v: 471473}, {t: 1587690710791, v: 471728}, {t: 1587690725791, v: 472002}, {t: 1587690740791, v: 472158}, {t: 1587690755791, v: 472329}, {t: 1587690770791, v: 472722}, {t: 1587690785791, v: 472925}, {t: 1587690800791, v: 473220}, {t: 1587690815791, v: 473460}, - {t: 1587690830791, v: 473748}, {t: 1587690845791, v: 473968}, {t: 1587690860791, v: 474261}, {t: 1587690875791, v: 474418}, {t: 1587690890791, v: 474726}, {t: 1587690905791, v: 474913}, {t: 1587690920791, v: 475031}, {t: 1587690935791, v: 475284}, {t: 1587690950791, v: 475563}, {t: 1587690965791, v: 475762}, {t: 1587690980791, v: 475945}, - {t: 1587690995791, v: 476302}, {t: 1587691010791, v: 476501}, {t: 1587691025791, v: 476849}, {t: 1587691040800, v: 477020}, {t: 1587691055791, v: 477280}, {t: 1587691070791, v: 477549}, {t: 1587691085791, v: 477758}, {t: 1587691100817, v: 477960}, {t: 1587691115791, v: 478261}, {t: 1587691130791, v: 478559}, {t: 1587691145791, v: 478704}, - {t: 1587691160804, v: 478950}, {t: 1587691175791, v: 479173}, {t: 1587691190791, v: 479368}, {t: 1587691205791, v: 479625}, {t: 1587691220805, v: 479866}, {t: 1587691235791, v: 480008}, {t: 1587691250791, v: 480155}, {t: 1587691265791, v: 480472}, {t: 1587691280811, v: 480598}, {t: 1587691295791, v: 480771}, {t: 1587691310791, v: 480996}, - {t: 1587691325791, v: 481200}, {t: 1587691340803, v: 481381}, {t: 1587691355791, v: 481584}, {t: 1587691370791, v: 481759}, {t: 1587691385791, v: 482003}, {t: 1587691400803, v: 482189}, {t: 1587691415791, v: 482457}, {t: 1587691430791, v: 482623}, {t: 1587691445791, v: 482768}, {t: 1587691460804, v: 483036}, {t: 1587691475791, v: 483322}, - {t: 1587691490791, v: 483566}, {t: 1587691505791, v: 483709}, {t: 1587691520807, v: 483838}, {t: 1587691535791, v: 484091}, {t: 1587691550791, v: 484236}, {t: 1587691565791, v: 484454}, {t: 1587691580816, v: 484710}, {t: 1587691595791, v: 484978}, {t: 1587691610791, v: 485271}, {t: 1587691625791, v: 485476}, {t: 1587691640792, v: 485640}, - {t: 1587691655791, v: 485921}, {t: 1587691670791, v: 486201}, {t: 1587691685791, v: 486555}, {t: 1587691700791, v: 486691}, {t: 1587691715791, v: 486831}, {t: 1587691730791, v: 487033}, {t: 1587691745791, v: 487268}, {t: 1587691760803, v: 487370}, {t: 1587691775791, v: 487571}, {t: 1587691790791, v: 487787}, {t: 1587691805791, v: 488036}, - {t: 1587691820791, v: 488241}, {t: 1587691835791, v: 488411}, {t: 1587691850791, v: 488625}, {t: 1587691865791, v: 488868}, {t: 1587691880791, v: 489005}, {t: 1587691895791, v: 489237}, {t: 1587691910791, v: 489545}, {t: 1587691925791, v: 489750}, {t: 1587691940791, v: 489899}, {t: 1587691955791, v: 490048}, {t: 1587691970791, v: 490364}, - {t: 1587691985791, v: 490485}, {t: 1587692000791, v: 490722}, {t: 1587692015791, v: 490866}, {t: 1587692030791, v: 491025}, {t: 1587692045791, v: 491286}, {t: 1587692060816, v: 491543}, {t: 1587692075791, v: 491787}, {t: 1587692090791, v: 492065}, {t: 1587692105791, v: 492223}, {t: 1587692120816, v: 492501}, {t: 1587692135791, v: 492767}, - {t: 1587692150791, v: 492955}, {t: 1587692165791, v: 493194}, {t: 1587692180792, v: 493402}, {t: 1587692195791, v: 493647}, {t: 1587692210791, v: 493897}, {t: 1587692225791, v: 494117}, {t: 1587692240805, v: 494356}, {t: 1587692255791, v: 494620}, {t: 1587692270791, v: 494762}, {t: 1587692285791, v: 495001}, {t: 1587692300805, v: 495222}, - {t: 1587692315791, v: 495393}, {t: 1587692330791, v: 495662}, {t: 1587692345791, v: 495875}, {t: 1587692360801, v: 496082}, {t: 1587692375791, v: 496196}, {t: 1587692390791, v: 496245}, {t: 1587692405791, v: 496295}, {t: 1587692420791, v: 496365}, {t: 1587692435791, v: 496401}, {t: 1587692450791, v: 496452}, {t: 1587692465791, v: 496491}, - {t: 1587692480791, v: 496544}, {t: 1587692555791, v: 496619}, {t: 1587692570791, v: 496852}, {t: 1587692585791, v: 497052}, {t: 1587692600791, v: 497245}, {t: 1587692615791, v: 497529}, {t: 1587692630791, v: 497697}, {t: 1587692645791, v: 497909}, {t: 1587692660791, v: 498156}, {t: 1587692675803, v: 498466}, {t: 1587692690791, v: 498647}, - {t: 1587692705791, v: 498805}, {t: 1587692720791, v: 499013}, {t: 1587692735805, v: 499169}, {t: 1587692750791, v: 499345}, {t: 1587692765791, v: 499499}, {t: 1587692780791, v: 499731}, {t: 1587692795806, v: 499972}, {t: 1587692810791, v: 500201}, {t: 1587692825791, v: 500354}, {t: 1587692840791, v: 500512}, {t: 1587692855791, v: 500739}, - {t: 1587692870791, v: 500958}, {t: 1587692885791, v: 501190}, {t: 1587692900791, v: 501233}, {t: 1587692915791, v: 501391}, {t: 1587692930791, v: 501649}, {t: 1587692945791, v: 501853}, {t: 1587692960791, v: 502065}, {t: 1587692975791, v: 502239}, {t: 1587692990810, v: 502554}, {t: 1587693005791, v: 502754}, {t: 1587693020791, v: 502938}, - {t: 1587693035791, v: 503141}, {t: 1587693050791, v: 503416}, {t: 1587693065791, v: 503642}, {t: 1587693080791, v: 503873}, {t: 1587693095791, v: 504014}, {t: 1587693110791, v: 504178}, {t: 1587693125821, v: 504374}, {t: 1587693140791, v: 504578}, {t: 1587693155791, v: 504753}, {t: 1587693170791, v: 505043}, {t: 1587693185791, v: 505232}, - {t: 1587693200791, v: 505437}, {t: 1587693215791, v: 505596}, {t: 1587693230791, v: 505923}, {t: 1587693245791, v: 506088}, {t: 1587693260791, v: 506307}, {t: 1587693275791, v: 506518}, {t: 1587693290791, v: 506786}, {t: 1587693305791, v: 507008}, {t: 1587693320803, v: 507260}, {t: 1587693335791, v: 507519}, {t: 1587693350791, v: 507776}, - {t: 1587693365791, v: 508003}, {t: 1587693380791, v: 508322}, {t: 1587693395804, v: 508551}, {t: 1587693410791, v: 508750}, {t: 1587693425791, v: 508994}, {t: 1587693440791, v: 509237}, {t: 1587693455791, v: 509452}, {t: 1587693470791, v: 509702}, {t: 1587693485791, v: 509971}, {t: 1587693500791, v: 510147}, {t: 1587693515791, v: 510471}, - {t: 1587693530816, v: 510666}, {t: 1587693545791, v: 510871}, {t: 1587693560791, v: 511123}, {t: 1587693575791, v: 511303}, {t: 1587693590791, v: 511500}, + {t: 1587690005791, f: 461968}, {t: 1587690020791, f: 462151}, {t: 1587690035797, f: 462336}, {t: 1587690050791, f: 462650}, {t: 1587690065791, f: 462813}, {t: 1587690080791, f: 462987}, {t: 1587690095791, f: 463095}, {t: 1587690110791, f: 463247}, {t: 1587690125791, f: 463440}, {t: 1587690140791, f: 463642}, {t: 1587690155791, f: 463811}, + {t: 1587690170791, f: 464027}, {t: 1587690185791, f: 464308}, {t: 1587690200791, f: 464514}, {t: 1587690215791, f: 464798}, {t: 1587690230791, f: 465018}, {t: 1587690245791, f: 465215}, {t: 1587690260813, f: 465431}, {t: 1587690275791, f: 465651}, {t: 1587690290791, f: 465870}, {t: 1587690305791, f: 466070}, {t: 1587690320792, f: 466248}, + {t: 1587690335791, f: 466506}, {t: 1587690350791, f: 466766}, {t: 1587690365791, f: 466970}, {t: 1587690380791, f: 467123}, {t: 1587690395791, f: 467265}, {t: 1587690410791, f: 467383}, {t: 1587690425791, f: 467629}, {t: 1587690440791, f: 467931}, {t: 1587690455791, f: 468097}, {t: 1587690470791, f: 468281}, {t: 1587690485791, f: 468477}, + {t: 1587690500791, f: 468649}, {t: 1587690515791, f: 468867}, {t: 1587690530791, f: 469150}, {t: 1587690545791, f: 469268}, {t: 1587690560791, f: 469488}, {t: 1587690575791, f: 469742}, {t: 1587690590791, f: 469951}, {t: 1587690605791, f: 470131}, {t: 1587690620791, f: 470337}, {t: 1587690635791, f: 470631}, {t: 1587690650791, f: 470832}, + {t: 1587690665791, f: 471077}, {t: 1587690680791, f: 471311}, {t: 1587690695791, f: 471473}, {t: 1587690710791, f: 471728}, {t: 1587690725791, f: 472002}, {t: 1587690740791, f: 472158}, {t: 1587690755791, f: 472329}, {t: 1587690770791, f: 472722}, {t: 1587690785791, f: 472925}, {t: 1587690800791, f: 473220}, {t: 1587690815791, f: 473460}, + {t: 1587690830791, f: 473748}, {t: 1587690845791, f: 473968}, {t: 1587690860791, f: 474261}, {t: 1587690875791, f: 474418}, {t: 1587690890791, f: 474726}, {t: 1587690905791, f: 474913}, {t: 1587690920791, f: 475031}, {t: 1587690935791, f: 475284}, {t: 1587690950791, f: 475563}, {t: 1587690965791, f: 475762}, {t: 1587690980791, f: 475945}, + {t: 1587690995791, f: 476302}, {t: 1587691010791, f: 476501}, {t: 1587691025791, f: 476849}, {t: 1587691040800, f: 477020}, {t: 1587691055791, f: 477280}, {t: 1587691070791, f: 477549}, {t: 1587691085791, f: 477758}, {t: 1587691100817, f: 477960}, {t: 1587691115791, f: 478261}, {t: 1587691130791, f: 478559}, {t: 1587691145791, f: 478704}, + {t: 1587691160804, f: 478950}, {t: 1587691175791, f: 479173}, {t: 1587691190791, f: 479368}, {t: 1587691205791, f: 479625}, {t: 1587691220805, f: 479866}, {t: 1587691235791, f: 480008}, {t: 1587691250791, f: 480155}, {t: 1587691265791, f: 480472}, {t: 1587691280811, f: 480598}, {t: 1587691295791, f: 480771}, {t: 1587691310791, f: 480996}, + {t: 1587691325791, f: 481200}, {t: 1587691340803, f: 481381}, {t: 1587691355791, f: 481584}, {t: 1587691370791, f: 481759}, {t: 1587691385791, f: 482003}, {t: 1587691400803, f: 482189}, {t: 1587691415791, f: 482457}, {t: 1587691430791, f: 482623}, {t: 1587691445791, f: 482768}, {t: 1587691460804, f: 483036}, {t: 1587691475791, f: 483322}, + {t: 1587691490791, f: 483566}, {t: 1587691505791, f: 483709}, {t: 1587691520807, f: 483838}, {t: 1587691535791, f: 484091}, {t: 1587691550791, f: 484236}, {t: 1587691565791, f: 484454}, {t: 1587691580816, f: 484710}, {t: 1587691595791, f: 484978}, {t: 1587691610791, f: 485271}, {t: 1587691625791, f: 485476}, {t: 1587691640792, f: 485640}, + {t: 1587691655791, f: 485921}, {t: 1587691670791, f: 486201}, {t: 1587691685791, f: 486555}, {t: 1587691700791, f: 486691}, {t: 1587691715791, f: 486831}, {t: 1587691730791, f: 487033}, {t: 1587691745791, f: 487268}, {t: 1587691760803, f: 487370}, {t: 1587691775791, f: 487571}, {t: 1587691790791, f: 487787}, {t: 1587691805791, f: 488036}, + {t: 1587691820791, f: 488241}, {t: 1587691835791, f: 488411}, {t: 1587691850791, f: 488625}, {t: 1587691865791, f: 488868}, {t: 1587691880791, f: 489005}, {t: 1587691895791, f: 489237}, {t: 1587691910791, f: 489545}, {t: 1587691925791, f: 489750}, {t: 1587691940791, f: 489899}, {t: 1587691955791, f: 490048}, {t: 1587691970791, f: 490364}, + {t: 1587691985791, f: 490485}, {t: 1587692000791, f: 490722}, {t: 1587692015791, f: 490866}, {t: 1587692030791, f: 491025}, {t: 1587692045791, f: 491286}, {t: 1587692060816, f: 491543}, {t: 1587692075791, f: 491787}, {t: 1587692090791, f: 492065}, {t: 1587692105791, f: 492223}, {t: 1587692120816, f: 492501}, {t: 1587692135791, f: 492767}, + {t: 1587692150791, f: 492955}, {t: 1587692165791, f: 493194}, {t: 1587692180792, f: 493402}, {t: 1587692195791, f: 493647}, {t: 1587692210791, f: 493897}, {t: 1587692225791, f: 494117}, {t: 1587692240805, f: 494356}, {t: 1587692255791, f: 494620}, {t: 1587692270791, f: 494762}, {t: 1587692285791, f: 495001}, {t: 1587692300805, f: 495222}, + {t: 1587692315791, f: 495393}, {t: 1587692330791, f: 495662}, {t: 1587692345791, f: 495875}, {t: 1587692360801, f: 496082}, {t: 1587692375791, f: 496196}, {t: 1587692390791, f: 496245}, {t: 1587692405791, f: 496295}, {t: 1587692420791, f: 496365}, {t: 1587692435791, f: 496401}, {t: 1587692450791, f: 496452}, {t: 1587692465791, f: 496491}, + {t: 1587692480791, f: 496544}, {t: 1587692555791, f: 496619}, {t: 1587692570791, f: 496852}, {t: 1587692585791, f: 497052}, {t: 1587692600791, f: 497245}, {t: 1587692615791, f: 497529}, {t: 1587692630791, f: 497697}, {t: 1587692645791, f: 497909}, {t: 1587692660791, f: 498156}, {t: 1587692675803, f: 498466}, {t: 1587692690791, f: 498647}, + {t: 1587692705791, f: 498805}, {t: 1587692720791, f: 499013}, {t: 1587692735805, f: 499169}, {t: 1587692750791, f: 499345}, {t: 1587692765791, f: 499499}, {t: 1587692780791, f: 499731}, {t: 1587692795806, f: 499972}, {t: 1587692810791, f: 500201}, {t: 1587692825791, f: 500354}, {t: 1587692840791, f: 500512}, {t: 1587692855791, f: 500739}, + {t: 1587692870791, f: 500958}, {t: 1587692885791, f: 501190}, {t: 1587692900791, f: 501233}, {t: 1587692915791, f: 501391}, {t: 1587692930791, f: 501649}, {t: 1587692945791, f: 501853}, {t: 1587692960791, f: 502065}, {t: 1587692975791, f: 502239}, {t: 1587692990810, f: 502554}, {t: 1587693005791, f: 502754}, {t: 1587693020791, f: 502938}, + {t: 1587693035791, f: 503141}, {t: 1587693050791, f: 503416}, {t: 1587693065791, f: 503642}, {t: 1587693080791, f: 503873}, {t: 1587693095791, f: 504014}, {t: 1587693110791, f: 504178}, {t: 1587693125821, f: 504374}, {t: 1587693140791, f: 504578}, {t: 1587693155791, f: 504753}, {t: 1587693170791, f: 505043}, {t: 1587693185791, f: 505232}, + {t: 1587693200791, f: 505437}, {t: 1587693215791, f: 505596}, {t: 1587693230791, f: 505923}, {t: 1587693245791, f: 506088}, {t: 1587693260791, f: 506307}, {t: 1587693275791, f: 506518}, {t: 1587693290791, f: 506786}, {t: 1587693305791, f: 507008}, {t: 1587693320803, f: 507260}, {t: 1587693335791, f: 507519}, {t: 1587693350791, f: 507776}, + {t: 1587693365791, f: 508003}, {t: 1587693380791, f: 508322}, {t: 1587693395804, f: 508551}, {t: 1587693410791, f: 508750}, {t: 1587693425791, f: 508994}, {t: 1587693440791, f: 509237}, {t: 1587693455791, f: 509452}, {t: 1587693470791, f: 509702}, {t: 1587693485791, f: 509971}, {t: 1587693500791, f: 510147}, {t: 1587693515791, f: 510471}, + {t: 1587693530816, f: 510666}, {t: 1587693545791, f: 510871}, {t: 1587693560791, f: 511123}, {t: 1587693575791, f: 511303}, {t: 1587693590791, f: 511500}, }, }, }, @@ -613,10 +613,10 @@ func BenchmarkDedupSeriesIterator(b *testing.B) { var s1, s2 []sample for i := 0; i < b.N; i++ { - s1 = append(s1, sample{t: int64(i * 10000), v: 1}) + s1 = append(s1, sample{t: int64(i * 10000), f: 1}) } for i := 0; i < b.N; i++ { - s2 = append(s2, sample{t: int64(i * 10000), v: 2}) + s2 = append(s2, sample{t: int64(i * 10000), f: 2}) } run(b, s1, s2) }) @@ -624,10 +624,10 @@ func BenchmarkDedupSeriesIterator(b *testing.B) { var s1, s2 []sample for i := 0; i < b.N; i++ { - s1 = append(s1, sample{t: int64(i * 10000), v: 1}) + s1 = append(s1, sample{t: int64(i * 10000), f: 1}) } for i := 0; i < b.N; i++ { - s2 = append(s2, sample{t: int64(i*10000) + 10, v: 2}) + s2 = append(s2, sample{t: int64(i*10000) + 10, f: 2}) } run(b, s1, s2) }) @@ -635,10 +635,10 @@ func BenchmarkDedupSeriesIterator(b *testing.B) { var s1, s2 []sample for i := 0; i < b.N; i++ { - s1 = append(s1, sample{t: int64(i*10000) + rand.Int63n(5000), v: 1}) + s1 = append(s1, sample{t: int64(i*10000) + rand.Int63n(5000), f: 1}) } for i := 0; i < b.N; i++ { - s2 = append(s2, sample{t: int64(i*10000) + +rand.Int63n(5000), v: 2}) + s2 = append(s2, sample{t: int64(i*10000) + +rand.Int63n(5000), f: 2}) } run(b, s1, s2) }) diff --git a/pkg/promclient/promclient.go b/pkg/promclient/promclient.go index 748ebf189b..430264471d 100644 --- a/pkg/promclient/promclient.go +++ b/pkg/promclient/promclient.go @@ -482,7 +482,8 @@ func (c *Client) PromqlQueryInstant(ctx context.Context, base *url.URL, query st vec = append(vec, promql.Sample{ Metric: lset, - Point: promql.Point{T: int64(e.Timestamp), V: float64(e.Value)}, + T: int64(e.Timestamp), + F: float64(e.Value), }) } diff --git a/pkg/query/querier_test.go b/pkg/query/querier_test.go index 65cf841381..069b88e77e 100644 --- a/pkg/query/querier_test.go +++ b/pkg/query/querier_test.go @@ -136,11 +136,11 @@ func TestQuerier_DownsampledData(t *testing.T) { exp := []promql.Series{ { Metric: labels.FromStrings("zzz", "a"), - Points: []promql.Point{{T: 100, V: 1}, {T: 200, V: 5}}, + Floats: []promql.FPoint{{T: 100, F: 1}, {T: 200, F: 5}}, }, { Metric: labels.FromStrings("zzz", "b"), - Points: []promql.Point{{T: 100, V: 3}, {T: 200, V: 8}}, + Floats: []promql.FPoint{{T: 100, F: 3}, {T: 200, F: 8}}, }, { Metric: labels.FromStrings("zzz", "c"), @@ -149,13 +149,13 @@ func TestQuerier_DownsampledData(t *testing.T) { // Prometheus engine code only takes the latest sample in each time window of // the retrieved data. Since we were operating in pre-aggregated data here, it lead // to overinflated values. - Points: []promql.Point{{T: 100, V: 128}, {T: 200, V: 30}}, + Floats: []promql.FPoint{{T: 100, F: 128}, {T: 200, F: 30}}, }, { Metric: labels.FromStrings("zzz", "d"), // Test case: Prometheus engine in each time window selects the sample // which is closest to the boundaries and adds up the different dimensions. - Points: []promql.Point{{T: 100, V: 16}, {T: 200, V: 30}}, + Floats: []promql.FPoint{{T: 100, F: 16}, {T: 200, F: 30}}, }, } @@ -950,8 +950,8 @@ func promqlResToSeries(res *promql.Result) []series { for i, ser := range matrix { series[i].lset = ser.Metric - for _, point := range ser.Points { - series[i].samples = append(series[i].samples, sample{t: point.T, v: point.V}) + for _, point := range ser.Floats { + series[i].samples = append(series[i].samples, sample{t: point.T, v: point.F}) } } return series @@ -1099,21 +1099,21 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { vec, err := r.Matrix() testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ - {Metric: expectedLset1, Points: []promql.Point{ - {T: 1587690300000, V: 13.652631578947368}, {T: 1587690400000, V: 14.049122807017543}, {T: 1587690500000, V: 13.961403508771928}, {T: 1587690600000, V: 13.617543859649121}, {T: 1587690700000, V: 14.568421052631578}, {T: 1587690800000, V: 14.989473684210525}, - {T: 1587690900000, V: 16.2}, {T: 1587691000000, V: 16.052631578947366}, {T: 1587691100000, V: 15.831578947368419}, {T: 1587691200000, V: 15.659649122807016}, {T: 1587691300000, V: 14.842105263157894}, {T: 1587691400000, V: 14.003508771929823}, - {T: 1587691500000, V: 13.782456140350876}, {T: 1587691600000, V: 13.86315789473684}, {T: 1587691700000, V: 15.270282598474376}, {T: 1587691800000, V: 14.343859649122805}, {T: 1587691900000, V: 13.975438596491227}, {T: 1587692000000, V: 13.399999999999999}, - {T: 1587692100000, V: 14.087719298245613}, {T: 1587692200000, V: 14.392982456140349}, {T: 1587692300000, V: 15.02456140350877}, {T: 1587692400000, V: 14.073684210526315}, {T: 1587692500000, V: 9.3772165751634}, {T: 1587692600000, V: 6.378947368421052}, - {T: 1587692700000, V: 8.19298245614035}, {T: 1587692800000, V: 11.91870302641626}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245613}, {T: 1587693100000, V: 13.466666666666665}, {T: 1587693200000, V: 14.028070175438595}, - {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754384}, + {Metric: expectedLset1, Floats: []promql.FPoint{ + {T: 1587690300000, F: 13.652631578947368}, {T: 1587690400000, F: 14.049122807017543}, {T: 1587690500000, F: 13.961403508771928}, {T: 1587690600000, F: 13.617543859649121}, {T: 1587690700000, F: 14.568421052631578}, {T: 1587690800000, F: 14.989473684210525}, + {T: 1587690900000, F: 16.2}, {T: 1587691000000, F: 16.052631578947366}, {T: 1587691100000, F: 15.831578947368419}, {T: 1587691200000, F: 15.659649122807016}, {T: 1587691300000, F: 14.842105263157894}, {T: 1587691400000, F: 14.003508771929823}, + {T: 1587691500000, F: 13.782456140350876}, {T: 1587691600000, F: 13.86315789473684}, {T: 1587691700000, F: 15.270282598474376}, {T: 1587691800000, F: 14.343859649122805}, {T: 1587691900000, F: 13.975438596491227}, {T: 1587692000000, F: 13.399999999999999}, + {T: 1587692100000, F: 14.087719298245613}, {T: 1587692200000, F: 14.392982456140349}, {T: 1587692300000, F: 15.02456140350877}, {T: 1587692400000, F: 14.073684210526315}, {T: 1587692500000, F: 9.3772165751634}, {T: 1587692600000, F: 6.378947368421052}, + {T: 1587692700000, F: 8.19298245614035}, {T: 1587692800000, F: 11.91870302641626}, {T: 1587692900000, F: 13.75813610765101}, {T: 1587693000000, F: 13.087719298245613}, {T: 1587693100000, F: 13.466666666666665}, {T: 1587693200000, F: 14.028070175438595}, + {T: 1587693300000, F: 14.23859649122807}, {T: 1587693400000, F: 15.407017543859647}, {T: 1587693500000, F: 15.915789473684208}, {T: 1587693600000, F: 15.712280701754384}, }}, - {Metric: expectedLset2, Points: []promql.Point{ - {T: 1587690300000, V: 13.691228070175438}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649121}, {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929823}, - {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350875}, {T: 1587691400000, V: 14.187259188557553}, - {T: 1587691500000, V: 13.828070175438596}, {T: 1587691600000, V: 13.971929824561402}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, {T: 1587691900000, V: 13.915789473684208}, {T: 1587692000000, V: 13.312280701754384}, - {T: 1587692100000, V: 14.136842105263156}, {T: 1587692200000, V: 14.392982456140349}, {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754385}, {T: 1587692500000, V: 9.421065148148148}, {T: 1587692600000, V: 6.421368067203301}, - {T: 1587692700000, V: 8.252631578947367}, {T: 1587692800000, V: 11.721237543747266}, {T: 1587692900000, V: 13.842105263157894}, {T: 1587693000000, V: 13.153509064307993}, {T: 1587693100000, V: 13.378947368421052}, {T: 1587693200000, V: 14.03157894736842}, - {T: 1587693300000, V: 14.14736842105263}, {T: 1587693400000, V: 15.343159785693986}, {T: 1587693500000, V: 15.90877192982456}, {T: 1587693600000, V: 15.761403508771927}, + {Metric: expectedLset2, Floats: []promql.FPoint{ + {T: 1587690300000, F: 13.691228070175438}, {T: 1587690400000, F: 14.098245614035086}, {T: 1587690500000, F: 13.905263157894735}, {T: 1587690600000, F: 13.617543859649121}, {T: 1587690700000, F: 14.350877192982455}, {T: 1587690800000, F: 15.003508771929823}, + {T: 1587690900000, F: 16.12280701754386}, {T: 1587691000000, F: 16.049122807017543}, {T: 1587691100000, F: 15.922807017543859}, {T: 1587691200000, F: 15.63157894736842}, {T: 1587691300000, F: 14.982456140350875}, {T: 1587691400000, F: 14.187259188557553}, + {T: 1587691500000, F: 13.828070175438596}, {T: 1587691600000, F: 13.971929824561402}, {T: 1587691700000, F: 15.31994329585807}, {T: 1587691800000, F: 14.30877192982456}, {T: 1587691900000, F: 13.915789473684208}, {T: 1587692000000, F: 13.312280701754384}, + {T: 1587692100000, F: 14.136842105263156}, {T: 1587692200000, F: 14.392982456140349}, {T: 1587692300000, F: 15.014035087719297}, {T: 1587692400000, F: 14.112280701754385}, {T: 1587692500000, F: 9.421065148148148}, {T: 1587692600000, F: 6.421368067203301}, + {T: 1587692700000, F: 8.252631578947367}, {T: 1587692800000, F: 11.721237543747266}, {T: 1587692900000, F: 13.842105263157894}, {T: 1587693000000, F: 13.153509064307993}, {T: 1587693100000, F: 13.378947368421052}, {T: 1587693200000, F: 14.03157894736842}, + {T: 1587693300000, F: 14.14736842105263}, {T: 1587693400000, F: 15.343159785693986}, {T: 1587693500000, F: 15.90877192982456}, {T: 1587693600000, F: 15.761403508771927}, }}, }, vec) }) @@ -1128,11 +1128,11 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { vec, err := r.Matrix() testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ - {Metric: expectedLset1, Points: []promql.Point{ - {T: 1587691800000, V: 14.457142857142856}, {T: 1587692300000, V: 14.761904761904761}, {T: 1587692800000, V: 13.127170868347338}, {T: 1587693300000, V: 12.93501400560224}, + {Metric: expectedLset1, Floats: []promql.FPoint{ + {T: 1587691800000, F: 14.457142857142856}, {T: 1587692300000, F: 14.761904761904761}, {T: 1587692800000, F: 13.127170868347338}, {T: 1587693300000, F: 12.93501400560224}, }}, - {Metric: expectedLset2, Points: []promql.Point{ - {T: 1587691800000, V: 14.464425770308122}, {T: 1587692300000, V: 14.763025210084033}, {T: 1587692800000, V: 13.148909112808576}, {T: 1587693300000, V: 12.92829131652661}, + {Metric: expectedLset2, Floats: []promql.FPoint{ + {T: 1587691800000, F: 14.464425770308122}, {T: 1587692300000, F: 14.763025210084033}, {T: 1587692800000, F: 13.148909112808576}, {T: 1587693300000, F: 12.92829131652661}, }}, }, vec) }) @@ -1169,16 +1169,16 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { vec, err := r.Matrix() testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ - {Metric: expectedLset, Points: []promql.Point{ - {T: 1587690300000, V: 13.691228070175438}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649121}, - {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929823}, {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, - {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350875}, {T: 1587691400000, V: 14.187259188557553}, - {T: 1587691500000, V: 13.828070175438596}, {T: 1587691600000, V: 13.971929824561402}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, - {T: 1587691900000, V: 13.915789473684208}, {T: 1587692000000, V: 13.312280701754384}, {T: 1587692100000, V: 14.136842105263156}, {T: 1587692200000, V: 14.392982456140349}, - {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754385}, {T: 1587692500000, V: 9.421065148148148}, {T: 1587692600000, V: 6.3736754978451735}, - {T: 1587692700000, V: 8.19632056099571}, {T: 1587692800000, V: 11.91870302641626}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245613}, - {T: 1587693100000, V: 13.466666666666665}, {T: 1587693200000, V: 14.028070175438595}, {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, - {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754384}, + {Metric: expectedLset, Floats: []promql.FPoint{ + {T: 1587690300000, F: 13.691228070175438}, {T: 1587690400000, F: 14.098245614035086}, {T: 1587690500000, F: 13.905263157894735}, {T: 1587690600000, F: 13.617543859649121}, + {T: 1587690700000, F: 14.350877192982455}, {T: 1587690800000, F: 15.003508771929823}, {T: 1587690900000, F: 16.12280701754386}, {T: 1587691000000, F: 16.049122807017543}, + {T: 1587691100000, F: 15.922807017543859}, {T: 1587691200000, F: 15.63157894736842}, {T: 1587691300000, F: 14.982456140350875}, {T: 1587691400000, F: 14.187259188557553}, + {T: 1587691500000, F: 13.828070175438596}, {T: 1587691600000, F: 13.971929824561402}, {T: 1587691700000, F: 15.31994329585807}, {T: 1587691800000, F: 14.30877192982456}, + {T: 1587691900000, F: 13.915789473684208}, {T: 1587692000000, F: 13.312280701754384}, {T: 1587692100000, F: 14.136842105263156}, {T: 1587692200000, F: 14.392982456140349}, + {T: 1587692300000, F: 15.014035087719297}, {T: 1587692400000, F: 14.112280701754385}, {T: 1587692500000, F: 9.421065148148148}, {T: 1587692600000, F: 6.3736754978451735}, + {T: 1587692700000, F: 8.19632056099571}, {T: 1587692800000, F: 11.91870302641626}, {T: 1587692900000, F: 13.75813610765101}, {T: 1587693000000, F: 13.087719298245613}, + {T: 1587693100000, F: 13.466666666666665}, {T: 1587693200000, F: 14.028070175438595}, {T: 1587693300000, F: 14.23859649122807}, {T: 1587693400000, F: 15.407017543859647}, + {T: 1587693500000, F: 15.915789473684208}, {T: 1587693600000, F: 15.712280701754384}, }}, }, vec) }) @@ -1193,11 +1193,11 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { vec, err := r.Matrix() testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ - {Metric: expectedLset, Points: []promql.Point{ - {T: 1587691800000, V: 14.464425770308122}, - {T: 1587692300000, V: 14.763025210084033}, - {T: 1587692800000, V: 13.143575607888273}, - {T: 1587693300000, V: 12.930291298224088}, + {Metric: expectedLset, Floats: []promql.FPoint{ + {T: 1587691800000, F: 14.464425770308122}, + {T: 1587692300000, F: 14.763025210084033}, + {T: 1587692800000, F: 13.143575607888273}, + {T: 1587693300000, F: 12.930291298224088}, }}, }, vec) }) diff --git a/pkg/query/remote_engine.go b/pkg/query/remote_engine.go index 1ba026fc3b..fc7c0b6ba3 100644 --- a/pkg/query/remote_engine.go +++ b/pkg/query/remote_engine.go @@ -187,17 +187,18 @@ func (r *remoteQuery) Exec(ctx context.Context) *promql.Result { continue } series := promql.Series{ - Metric: labelpb.ZLabelsToPromLabels(ts.Labels), - Points: make([]promql.Point, 0, len(ts.Samples)), + Metric: labelpb.ZLabelsToPromLabels(ts.Labels), + Floats: make([]promql.FPoint, 0, len(ts.Samples)), + Histograms: make([]promql.HPoint, 0, len(ts.Histograms)), } for _, s := range ts.Samples { - series.Points = append(series.Points, promql.Point{ + series.Floats = append(series.Floats, promql.FPoint{ T: s.Timestamp, - V: s.Value, + F: s.Value, }) } for _, h := range ts.Histograms { - series.Points = append(series.Points, promql.Point{ + series.Histograms = append(series.Histograms, promql.HPoint{ T: h.Timestamp, H: prompb.HistogramProtoToFloatHistogram(h), }) diff --git a/pkg/query/test_test.go b/pkg/query/test_test.go index b9408534ca..f43e931e4f 100644 --- a/pkg/query/test_test.go +++ b/pkg/query/test_test.go @@ -392,14 +392,14 @@ func parseNumber(s string) (float64, error) { type loadCmd struct { gap time.Duration metrics map[uint64]labels.Labels - defs map[uint64][]promql.Point + defs map[uint64][]promql.FPoint } func newLoadCmd(gap time.Duration) *loadCmd { return &loadCmd{ gap: gap, metrics: map[uint64]labels.Labels{}, - defs: map[uint64][]promql.Point{}, + defs: map[uint64][]promql.FPoint{}, } } @@ -411,13 +411,13 @@ func (cmd loadCmd) String() string { func (cmd *loadCmd) set(m labels.Labels, vals ...parser.SequenceValue) { h := m.Hash() - samples := make([]promql.Point, 0, len(vals)) + samples := make([]promql.FPoint, 0, len(vals)) ts := testStartTime for _, v := range vals { if !v.Omitted { - samples = append(samples, promql.Point{ + samples = append(samples, promql.FPoint{ T: ts.UnixNano() / int64(time.Millisecond/time.Nanosecond), - V: v.Value, + F: v.Value, }) } ts = ts.Add(cmd.gap) @@ -432,7 +432,7 @@ func (cmd *loadCmd) Append(a storage.Appender) error { m := cmd.metrics[h] for _, s := range smpls { - if _, err := a.Append(0, m, s.T, s.V); err != nil { + if _, err := a.Append(0, m, s.T, s.F); err != nil { return err } } @@ -528,8 +528,8 @@ func (ev *evalCmd) compareResult(result parser.Value) error { if ev.ordered && exp.pos != pos+1 { return errors.Errorf("expected metric %s with %v at position %d but was at %d", v.Metric, exp.vals, exp.pos, pos+1) } - if !almostEqual(exp.vals[0].Value, v.V) { - return errors.Errorf("expected %v for %s but got %v", exp.vals[0].Value, v.Metric, v.V) + if !almostEqual(exp.vals[0].Value, v.F) { + return errors.Errorf("expected %v for %s but got %v", exp.vals[0].Value, v.Metric, v.F) } seen[fp] = true @@ -538,7 +538,7 @@ func (ev *evalCmd) compareResult(result parser.Value) error { if !seen[fp] { details := fmt.Sprintln("vector result", len(val), ev.expr) for _, ss := range val { - details += fmt.Sprintln(" ", ss.Metric, ss.Point) + details += fmt.Sprintln(" ", ss.Metric, ss.T, ss.F) } return errors.Errorf("expected metric %s with %v not found; details: %v", ev.metrics[fp], expVals, details) } @@ -596,15 +596,15 @@ func (ev *evalCmd) Eval(ctx context.Context, queryEngine *promql.Engine, queryab mat := rangeRes.Value.(promql.Matrix) vec := make(promql.Vector, 0, len(mat)) for _, series := range mat { - for _, point := range series.Points { + for _, point := range series.Floats { if point.T == timeMilliseconds(ev.start) { - vec = append(vec, promql.Sample{Metric: series.Metric, Point: point}) + vec = append(vec, promql.Sample{Metric: series.Metric, T: point.T, F: point.F}) break } } } if _, ok := res.Value.(promql.Scalar); ok { - err = ev.compareResult(promql.Scalar{V: vec[0].Point.V}) + err = ev.compareResult(promql.Scalar{V: vec[0].F}) } else { err = ev.compareResult(vec) } diff --git a/pkg/rules/manager_test.go b/pkg/rules/manager_test.go index 7832016567..1814f18d35 100644 --- a/pkg/rules/manager_test.go +++ b/pkg/rules/manager_test.go @@ -427,11 +427,13 @@ groups: return func(ctx context.Context, q string, ts time.Time) (promql.Vector, error) { return []promql.Sample{ { - Point: promql.Point{T: 0, V: 1}, + T: 0, + F: 1, Metric: labels.FromStrings("foo", "bar"), }, { - Point: promql.Point{T: 0, V: 1}, + T: 0, + F: 1, Metric: labels.FromStrings("foo1", "bar1"), }, }, nil diff --git a/pkg/store/storepb/prompb/samples.go b/pkg/store/storepb/prompb/samples.go index f323455be0..a276d9264e 100644 --- a/pkg/store/storepb/prompb/samples.go +++ b/pkg/store/storepb/prompb/samples.go @@ -23,15 +23,15 @@ func SamplesFromSamplePairs(samples []model.SamplePair) []Sample { return result } -// SamplesFromPromqlPoints converts a slice of promql.Point +// SamplesFromPromqlSamples converts a slice of promql.Sample // to a slice of Sample. -func SamplesFromPromqlPoints(samples ...promql.Point) ([]Sample, []Histogram) { +func SamplesFromPromqlSamples(samples ...promql.Sample) ([]Sample, []Histogram) { floats := make([]Sample, 0, len(samples)) histograms := make([]Histogram, 0, len(samples)) for _, s := range samples { if s.H == nil { floats = append(floats, Sample{ - Value: s.V, + Value: s.F, Timestamp: s.T, }) } else { @@ -42,6 +42,23 @@ func SamplesFromPromqlPoints(samples ...promql.Point) ([]Sample, []Histogram) { return floats, histograms } +// SamplesFromPromqlSeries converts promql.Series to a slice of Sample and a slice of Histogram. +func SamplesFromPromqlSeries(series promql.Series) ([]Sample, []Histogram) { + floats := make([]Sample, 0, len(series.Floats)) + for _, f := range series.Floats { + floats = append(floats, Sample{ + Value: f.F, + Timestamp: f.T, + }) + } + histograms := make([]Histogram, 0, len(series.Histograms)) + for _, h := range series.Histograms { + histograms = append(histograms, FloatHistogramToHistogramProto(h.T, h.H)) + } + + return floats, histograms +} + // HistogramProtoToHistogram extracts a (normal integer) Histogram from the // provided proto message. The caller has to make sure that the proto message // represents an interger histogram and not a float histogram.