mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #3899 from krasi-georgiev/gogofast
revert to using the gogofast plugin and regenerate grpc server
This commit is contained in:
commit
7b7e3506ac
|
@ -311,24 +311,6 @@ func (m *QueryResult) MarshalTo(dAtA []byte) (int, error) {
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeFixed64Remote(dAtA []byte, offset int, v uint64) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
dAtA[offset+4] = uint8(v >> 32)
|
|
||||||
dAtA[offset+5] = uint8(v >> 40)
|
|
||||||
dAtA[offset+6] = uint8(v >> 48)
|
|
||||||
dAtA[offset+7] = uint8(v >> 56)
|
|
||||||
return offset + 8
|
|
||||||
}
|
|
||||||
func encodeFixed32Remote(dAtA []byte, offset int, v uint32) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
return offset + 4
|
|
||||||
}
|
|
||||||
func encodeVarintRemote(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintRemote(dAtA []byte, offset int, v uint64) int {
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
|
|
@ -12,12 +12,10 @@ import _ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
|
||||||
import time "time"
|
import time "time"
|
||||||
|
|
||||||
import (
|
import context "golang.org/x/net/context"
|
||||||
context "golang.org/x/net/context"
|
import grpc "google.golang.org/grpc"
|
||||||
grpc "google.golang.org/grpc"
|
|
||||||
)
|
|
||||||
|
|
||||||
import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
import types "github.com/gogo/protobuf/types"
|
||||||
|
|
||||||
import io "io"
|
import io "io"
|
||||||
|
|
||||||
|
@ -328,8 +326,8 @@ func (m *SeriesDeleteRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
if m.MinTime != nil {
|
if m.MinTime != nil {
|
||||||
dAtA[i] = 0xa
|
dAtA[i] = 0xa
|
||||||
i++
|
i++
|
||||||
i = encodeVarintRpc(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.MinTime)))
|
i = encodeVarintRpc(dAtA, i, uint64(types.SizeOfStdTime(*m.MinTime)))
|
||||||
n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.MinTime, dAtA[i:])
|
n1, err := types.StdTimeMarshalTo(*m.MinTime, dAtA[i:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -338,8 +336,8 @@ func (m *SeriesDeleteRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
if m.MaxTime != nil {
|
if m.MaxTime != nil {
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
i++
|
i++
|
||||||
i = encodeVarintRpc(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.MaxTime)))
|
i = encodeVarintRpc(dAtA, i, uint64(types.SizeOfStdTime(*m.MaxTime)))
|
||||||
n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.MaxTime, dAtA[i:])
|
n2, err := types.StdTimeMarshalTo(*m.MaxTime, dAtA[i:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
@ -378,24 +376,6 @@ func (m *SeriesDeleteResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeFixed64Rpc(dAtA []byte, offset int, v uint64) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
dAtA[offset+4] = uint8(v >> 32)
|
|
||||||
dAtA[offset+5] = uint8(v >> 40)
|
|
||||||
dAtA[offset+6] = uint8(v >> 48)
|
|
||||||
dAtA[offset+7] = uint8(v >> 56)
|
|
||||||
return offset + 8
|
|
||||||
}
|
|
||||||
func encodeFixed32Rpc(dAtA []byte, offset int, v uint32) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
return offset + 4
|
|
||||||
}
|
|
||||||
func encodeVarintRpc(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintRpc(dAtA []byte, offset int, v uint64) int {
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
@ -437,11 +417,11 @@ func (m *SeriesDeleteRequest) Size() (n int) {
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
if m.MinTime != nil {
|
if m.MinTime != nil {
|
||||||
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.MinTime)
|
l = types.SizeOfStdTime(*m.MinTime)
|
||||||
n += 1 + l + sovRpc(uint64(l))
|
n += 1 + l + sovRpc(uint64(l))
|
||||||
}
|
}
|
||||||
if m.MaxTime != nil {
|
if m.MaxTime != nil {
|
||||||
l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.MaxTime)
|
l = types.SizeOfStdTime(*m.MaxTime)
|
||||||
n += 1 + l + sovRpc(uint64(l))
|
n += 1 + l + sovRpc(uint64(l))
|
||||||
}
|
}
|
||||||
if len(m.Matchers) > 0 {
|
if len(m.Matchers) > 0 {
|
||||||
|
@ -759,7 +739,7 @@ func (m *SeriesDeleteRequest) Unmarshal(dAtA []byte) error {
|
||||||
if m.MinTime == nil {
|
if m.MinTime == nil {
|
||||||
m.MinTime = new(time.Time)
|
m.MinTime = new(time.Time)
|
||||||
}
|
}
|
||||||
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.MinTime, dAtA[iNdEx:postIndex]); err != nil {
|
if err := types.StdTimeUnmarshal(m.MinTime, dAtA[iNdEx:postIndex]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
@ -792,7 +772,7 @@ func (m *SeriesDeleteRequest) Unmarshal(dAtA []byte) error {
|
||||||
if m.MaxTime == nil {
|
if m.MaxTime == nil {
|
||||||
m.MaxTime = new(time.Time)
|
m.MaxTime = new(time.Time)
|
||||||
}
|
}
|
||||||
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.MaxTime, dAtA[iNdEx:postIndex]); err != nil {
|
if err := types.StdTimeUnmarshal(m.MaxTime, dAtA[iNdEx:postIndex]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
|
|
@ -50,9 +50,11 @@ func request_Admin_DeleteSeries_0(ctx context.Context, marshaler runtime.Marshal
|
||||||
var protoReq SeriesDeleteRequest
|
var protoReq SeriesDeleteRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if req.ContentLength > 0 {
|
||||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
|
||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
msg, err := client.DeleteSeries(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
msg, err := client.DeleteSeries(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
|
|
|
@ -8,6 +8,8 @@ import fmt "fmt"
|
||||||
import math "math"
|
import math "math"
|
||||||
import _ "github.com/gogo/protobuf/gogoproto"
|
import _ "github.com/gogo/protobuf/gogoproto"
|
||||||
|
|
||||||
|
import binary "encoding/binary"
|
||||||
|
|
||||||
import io "io"
|
import io "io"
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
@ -189,7 +191,8 @@ func (m *Sample) MarshalTo(dAtA []byte) (int, error) {
|
||||||
if m.Value != 0 {
|
if m.Value != 0 {
|
||||||
dAtA[i] = 0x9
|
dAtA[i] = 0x9
|
||||||
i++
|
i++
|
||||||
i = encodeFixed64Types(dAtA, i, uint64(math.Float64bits(float64(m.Value))))
|
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
||||||
|
i += 8
|
||||||
}
|
}
|
||||||
if m.Timestamp != 0 {
|
if m.Timestamp != 0 {
|
||||||
dAtA[i] = 0x10
|
dAtA[i] = 0x10
|
||||||
|
@ -336,24 +339,6 @@ func (m *LabelMatcher) MarshalTo(dAtA []byte) (int, error) {
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeFixed64Types(dAtA []byte, offset int, v uint64) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
dAtA[offset+4] = uint8(v >> 32)
|
|
||||||
dAtA[offset+5] = uint8(v >> 40)
|
|
||||||
dAtA[offset+6] = uint8(v >> 48)
|
|
||||||
dAtA[offset+7] = uint8(v >> 56)
|
|
||||||
return offset + 8
|
|
||||||
}
|
|
||||||
func encodeFixed32Types(dAtA []byte, offset int, v uint32) int {
|
|
||||||
dAtA[offset] = uint8(v)
|
|
||||||
dAtA[offset+1] = uint8(v >> 8)
|
|
||||||
dAtA[offset+2] = uint8(v >> 16)
|
|
||||||
dAtA[offset+3] = uint8(v >> 24)
|
|
||||||
return offset + 4
|
|
||||||
}
|
|
||||||
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
|
||||||
for v >= 1<<7 {
|
for v >= 1<<7 {
|
||||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||||
|
@ -486,15 +471,8 @@ func (m *Sample) Unmarshal(dAtA []byte) error {
|
||||||
if (iNdEx + 8) > l {
|
if (iNdEx + 8) > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
|
v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
||||||
iNdEx += 8
|
iNdEx += 8
|
||||||
v = uint64(dAtA[iNdEx-8])
|
|
||||||
v |= uint64(dAtA[iNdEx-7]) << 8
|
|
||||||
v |= uint64(dAtA[iNdEx-6]) << 16
|
|
||||||
v |= uint64(dAtA[iNdEx-5]) << 24
|
|
||||||
v |= uint64(dAtA[iNdEx-4]) << 32
|
|
||||||
v |= uint64(dAtA[iNdEx-3]) << 40
|
|
||||||
v |= uint64(dAtA[iNdEx-2]) << 48
|
|
||||||
v |= uint64(dAtA[iNdEx-1]) << 56
|
|
||||||
m.Value = float64(math.Float64frombits(v))
|
m.Value = float64(math.Float64frombits(v))
|
||||||
case 2:
|
case 2:
|
||||||
if wireType != 0 {
|
if wireType != 0 {
|
||||||
|
|
|
@ -25,7 +25,7 @@ DIRS="prompb"
|
||||||
|
|
||||||
for dir in ${DIRS}; do
|
for dir in ${DIRS}; do
|
||||||
pushd ${dir}
|
pushd ${dir}
|
||||||
protoc --gofast_out=plugins=grpc:. -I=. \
|
protoc --gogofast_out=plugins=grpc:. -I=. \
|
||||||
-I="${GOGOPROTO_PATH}" \
|
-I="${GOGOPROTO_PATH}" \
|
||||||
-I="${PROM_PATH}" \
|
-I="${PROM_PATH}" \
|
||||||
-I="${GRPC_GATEWAY_ROOT}/third_party/googleapis" \
|
-I="${GRPC_GATEWAY_ROOT}/third_party/googleapis" \
|
||||||
|
|
Loading…
Reference in a new issue