This commit is contained in:
2026-06-12 06:11:57 +00:00
parent dc0410c9e4
commit 58db58a0a0
14 changed files with 1305 additions and 1227 deletions

View File

@@ -360,7 +360,7 @@ func (s *MeasuresAppendRecord) Parse(r *bytes.Buffer) (err error) {
type MetricAddRecord struct {
MetricID uint32
MetricType qb.MetricType
FracDigits int
FracDigits byte
}
func (s MetricAddRecord) Pack(w io.Writer) {
@@ -368,7 +368,7 @@ func (s MetricAddRecord) Pack(w io.Writer) {
CodeMetricAdd,
0, 0, 0, 0, //
byte(s.MetricType),
byte(s.FracDigits),
s.FracDigits,
}
bin.PutUint32(arr[1:], s.MetricID)
w.Write(arr)
@@ -381,7 +381,7 @@ func (s *MetricAddRecord) Parse(src io.Reader) (err error) {
}
s.MetricID, _ = bin.GetUint32(arr)
s.MetricType = qb.MetricType(arr[4])
s.FracDigits = int(arr[5])
s.FracDigits = arr[5]
return nil
}